ci: filenames and paths

This commit is contained in:
Michael Grote 2023-06-28 14:40:02 +02:00
parent ffc773425c
commit 144f6090c1

View file

@ -17,34 +17,25 @@ steps:
- cd sanoid - cd sanoid
- # checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!) - # checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!)
- git checkout $(git tag | grep "^v" | tail -n 1) - git checkout $(git tag | grep "^v" | tail -n 1)
- version=$(git tag | grep "^v" | tail -n 1)
- ln -s packages/debian . - ln -s packages/debian .
- dpkg-buildpackage -uc -us - dpkg-buildpackage -uc -us
- cd ..
- ls -lah
- pwd
- BUILD_DIR="./tmp"
- OUTPUT_DIR="./output"
- GIT_COMMIT_ID=$(git rev-parse --short HEAD) # git-commit-id: z.B. 39d35da
- VERSION=$(git rev-list --all --count) # Anzahl aller Commits (int)
- GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) # branch-Name
- name: upload - name: upload
image: registry.mgrote.net/allzweckcontainer:latest # privates Image, Pull-Secret notwendig image: registry.mgrote.net/allzweckcontainer:latest # privates Image, Pull-Secret notwendig
environment: environment:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
auth_token: auth_token:
from_secret: httpd-api-server-token from_secret: httpd-api-server-token
commands: commands: # upload
- pwd - cp "../sanoid_${version}_all.deb" "../sanoid_latest_all.deb"
- ls -lah ./sanhoid/output/ - cp "../sanoid_${version}_all.deb" "../sanoid_${DRONE_COMMIT_BRANCH}_all.deb"
# upload
- | - |
curl -X POST -H "token: $auth_token" -F "file=@./sanhoid/output/sanhoid-${DRONE_COMMIT_SHA:0:8}.tar.gz" http://docker10.grote.lan:5040/upload 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=@./sanhoid/output/sanhoid-${DRONE_COMMIT_BRANCH}.tar.gz" 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=@./sanhoid/output/sanhoid-latest.tar.gz" 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 image_pull_secrets: # wird für den Login auf registry.mgrote.net benötigt
- dockerconfigjson - dockerconfigjson