Commit cb9f27bc authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'cifix8' into 'master'

More standardization

See merge request !40
parents 784f577c 2a2e105b
Pipeline #719 passed with stages
in 58 seconds
......@@ -60,8 +60,8 @@ sources-upload:
# Import signing key
- echo "$SOURCES_GPG_SIGNKEY" | gpg --import
# Work out naming
- export SOURCE_TAG="${CI_BUILD_TAG%%-*}"
- export ARCHIVE_NAME=${CI_PROJECT_NAME}-${SOURCE_TAG##v}
- export ARCHIVE_VERSION="${CI_BUILD_TAG%%-*}"
- export ARCHIVE_NAME=${CI_PROJECT_NAME}-${ARCHIVE_VERSION##v}
# Create tar archive
- git archive --format=tar --prefix=${ARCHIVE_NAME}/ ${CI_BUILD_TAG} > ../${ARCHIVE_NAME}.tar
# Create compressed versions
......@@ -69,10 +69,10 @@ sources-upload:
# Sign compressed tar files
- gpg --sign --detach-sign --armor ../${ARCHIVE_NAME}.tar.xz
# Upload files, translating .asc into .sign
- lftp -e "set ssl:ca-file '/etc/ssl/certs/ca-certificates.crt'; set net:max-retries '5'; set net:timeout '60'; rm -r -f '${SOURCE_TAG}'; mkdir '${SOURCE_TAG}' && put ../'${ARCHIVE_NAME}.tar.xz' -o '${SOURCE_TAG}/${ARCHIVE_NAME}.tar.xz' && put ../'${ARCHIVE_NAME}.tar.xz.asc' -o '${SOURCE_TAG}/${ARCHIVE_NAME}.tar.xz.sign'; quit" -u "$UPLOAD_CRED" "$UPLOAD_HOST" 2>&1
- lftp -e "set ssl:ca-file '/etc/ssl/certs/ca-certificates.crt'; set net:max-retries '5'; set net:timeout '60'; rm -r -f '${ARCHIVE_VERSION}'; mkdir '${ARCHIVE_VERSION}' && put ../'${ARCHIVE_NAME}.tar.xz' -o '${ARCHIVE_VERSION}/${ARCHIVE_NAME}.tar.xz' && put ../'${ARCHIVE_NAME}.tar.xz.asc' -o '${ARCHIVE_VERSION}/${ARCHIVE_NAME}.tar.xz.sign'; quit" -u "$UPLOAD_CRED" "$UPLOAD_HOST" 2>&1
# Test uploaded files
- curl --fail -o /dev/null "$DOWNLOAD_URL/${SOURCE_TAG}/${ARCHIVE_NAME}.tar.xz"
- curl --fail -o /dev/null "$DOWNLOAD_URL/${SOURCE_TAG}/${ARCHIVE_NAME}.tar.xz.sign"
- curl --fail -o /dev/null "$DOWNLOAD_URL/${ARCHIVE_VERSION}/${ARCHIVE_NAME}.tar.xz"
- curl --fail -o /dev/null "$DOWNLOAD_URL/${ARCHIVE_VERSION}/${ARCHIVE_NAME}.tar.xz.sign"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment