--- kind: pipeline type: docker name: default steps: - name: run gitleaks image: plugins/gitleaks settings: path: . - name: build image: registry.mgrote.net/allzweckcontainer:latest # privates Image, Pull-Secret notwendig environment: DEBIAN_FRONTEND: noninteractive commands: - git clone https://git.mgrote.net/Mirror/sanoid.git - cd sanoid - # checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!) - git checkout $(git tag | grep "^v" | tail -n 1) - version=$(git tag | grep "^v" | tail -n 1) - ln -s packages/debian . - dpkg-buildpackage -uc -us - name: upload image: registry.mgrote.net/allzweckcontainer:latest # privates Image, Pull-Secret notwendig environment: DEBIAN_FRONTEND: noninteractive auth_token: from_secret: httpd-api-server-token commands: # upload - cp "../sanoid_${version}_all.deb" "../sanoid_latest_all.deb" - cp "../sanoid_${version}_all.deb" "../sanoid_${DRONE_COMMIT_BRANCH}_all.deb" - | curl -X POST -H "token: $auth_token" -F "file=@../sanoid_${version}_all.deb" http://docker10.grote.lan:5040/upload - | curl -X POST -H "token: $auth_token" -F "file=@../sanoid_${DRONE_COMMIT_BRANCH}_all.deb" http://docker10.grote.lan:5040/upload - | curl -X POST -H "token: $auth_token" -F "file=@../sanoid_latest_all.deb" http://docker10.grote.lan:5040/upload image_pull_secrets: # wird für den Login auf registry.mgrote.net benötigt - dockerconfigjson # siehe: https://wiki.mgrote.net/artikel/technik/drone.io_-_pull_secrets