Compare commits

...

2 commits

Author SHA1 Message Date
Benjamin Renard
ffb0955fdb CI: Improve output of publish-apt step
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-05-01 21:30:03 +02:00
Benjamin Renard
2ed8f8132e debian package: put script in /usr/bin 2022-05-01 21:29:22 +02:00
3 changed files with 17 additions and 10 deletions

View file

@ -55,15 +55,22 @@ pipeline:
when: when:
event: tag event: tag
commands: commands:
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*_all.deb ) $APT_API_URL/files/check-slapdd-crc32 - echo "Upload files..."
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.buildinfo ) $APT_API_URL/files/check-slapdd-crc32 - curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*_all.deb ) $APT_API_URL/files/check-slapdd-crc32
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.changes ) $APT_API_URL/files/check-slapdd-crc32 - curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.buildinfo ) $APT_API_URL/files/check-slapdd-crc32
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.dsc ) $APT_API_URL/files/check-slapdd-crc32 - curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.changes ) $APT_API_URL/files/check-slapdd-crc32
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.tar.gz ) $APT_API_URL/files/check-slapdd-crc32 - curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.dsc ) $APT_API_URL/files/check-slapdd-crc32
- curl -u $APT_CREDS -X POST $APT_API_URL/repos/$APT_REPO_NAME/include/check-slapdd-crc32 - curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.tar.gz ) $APT_API_URL/files/check-slapdd-crc32
- curl --silent -u $APT_CREDS -X POST $APT_API_URL/repos/$APT_REPO_NAME/include/check-slapdd-crc32
- APT_SNAP_NAME=$(date +%s)_$APT_REPO_NAME - APT_SNAP_NAME=$(date +%s)_$APT_REPO_NAME
- echo "Create snapshot of repository $APT_REPO_NAME ($APT_SNAP_NAME)..."
- > - >
curl -u $APT_CREDS -X POST -H 'Content-Type: application/json' --data "{\"Name\":\"$APT_SNAP_NAME\"}" $APT_API_URL/repos/$APT_REPO_NAME/snapshots curl --silent -u $APT_CREDS -X POST -H 'Content-Type: application/json' --data "{\"Name\":\"$APT_SNAP_NAME\"}" $APT_API_URL/repos/$APT_REPO_NAME/snapshots
- echo "Update published snapshot for repository $APT_REPO_NAME (use $APT_SNAP_NAME)..."
- > - >
curl -u $APT_CREDS -X PUT -H 'Content-Type: application/json' --data "{\"Snapshots\": [{\"Component\": \"main\", \"Name\": \"$APT_SNAP_NAME\"}]}" $APT_API_URL/publish/:./$APT_REPO_NAME curl --silent -u $APT_CREDS -X PUT -H 'Content-Type: application/json' --data "{\"Snapshots\": [{\"Component\": \"main\", \"Name\": \"$APT_SNAP_NAME\"}]}" $APT_API_URL/publish/:./$APT_REPO_NAME
- echo "Check uploaded packages..."
- >
curl --silent -u $APT_CREDS '$APT_API_URL/repos/stable/packages?q=check-slapdd-crc32'|jq
- echo "Done"
secrets: [ apt_api_url, apt_creds, apt_repo_name ] secrets: [ apt_api_url, apt_creds, apt_repo_name ]

2
debian/dirs vendored
View file

@ -1 +1 @@
usr/lib/nagios/plugins usr/bin

2
debian/install vendored
View file

@ -1 +1 @@
check_slapdd_crc32 usr/lib/nagios/plugins check_slapdd_crc32 usr/bin