--- kind: pipeline type: docker name: default steps: - name: run gitleaks image: plugins/gitleaks settings: path: . - name: build package image: registry.mgrote.net/fpm:latest 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) - export version=$(git tag | grep "^v" | tail -n 1 | tr -d v) - echo $version - ls -lah - pwd - chmod 0755 sanoid - chmod 0755 syncoid - | fpm \ -s dir \ -t deb \ --name sanoid \ --architecture all \ --description "sanoid deb package" \ --url "https://git.mgrote.net/mg/sanoid-deb" \ -p sanoid_$(echo $version).deb \ -v $(echo $version) \ sanoid=/usr/bin/sanoid \ syncoid=/usr/bin/syncoid \ sanoid.conf=/etc/sanoid/sanoid.conf \ sanoid.defaults.conf=/etc/sanoid/sanoid.defaults.conf - pwd - ls -lah - name: upload image: registry.mgrote.net/allzweckcontainer:latest environment: DEBIAN_FRONTEND: noninteractive auth_token: from_secret: httpd-api-server-token commands: - | curl -X POST -H "token: $auth_token" -F "file=@./sanoid_$(echo $version).deb" http://docker10.grote.lan:5040/upload