CI: try to use brenard/aptly-publish plugin
This commit is contained in:
parent
07bf62812d
commit
96d2e5c7d4
1 changed files with 12 additions and 21 deletions
|
@ -51,26 +51,17 @@ pipeline:
|
||||||
|
|
||||||
publish-apt:
|
publish-apt:
|
||||||
group: publish
|
group: publish
|
||||||
image: brenard/curl
|
image: brenard/aptly-publish
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
commands:
|
settings:
|
||||||
- echo "Upload files..."
|
api_url:
|
||||||
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*_all.deb ) $APT_API_URL/files/check-slapdd-crc32
|
from_secret: apt_api_url
|
||||||
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.buildinfo ) $APT_API_URL/files/check-slapdd-crc32
|
api_username:
|
||||||
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.changes ) $APT_API_URL/files/check-slapdd-crc32
|
from_secret: apt_api_username
|
||||||
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.dsc ) $APT_API_URL/files/check-slapdd-crc32
|
api_password:
|
||||||
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.tar.gz ) $APT_API_URL/files/check-slapdd-crc32
|
from_secret: apt_api_password
|
||||||
- curl --silent -u $APT_CREDS -X POST $APT_API_URL/repos/$APT_REPO_NAME/include/check-slapdd-crc32
|
repo_name:
|
||||||
- APT_SNAP_NAME=$(date +%s)_$APT_REPO_NAME
|
from_secret: apt_repo_name
|
||||||
- echo "Create snapshot of repository $APT_REPO_NAME ($APT_SNAP_NAME)..."
|
path: dist
|
||||||
- >
|
source_name: check-slapdd-crc32
|
||||||
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 --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 ]
|
|
||||||
|
|
Loading…
Reference in a new issue