HMBXR5601-827 - Show more status; Handle component areas of published repos

This commit is contained in:
Dan Hawkins 2019-08-28 11:36:05 +01:00
commit fa69b27231

View file

@ -69,12 +69,14 @@ pipeline {
script {
echo "Repo name is ${REPO_NAME}"
sh """#!/bin/bash -v
aptly repo -config="${APTLY_CONFIG_FILE}" show "${REPO_NAME}"
aptly repo -config="${APTLY_CONFIG_FILE}" -with-packages show "${REPO_NAME}"
if [ \$? -ne 0 ]; then
echo "aptly repo ${REPO_NAME} does not exist; Creating it"
aptly repo -config="${APTLY_CONFIG_FILE}" create "${REPO_NAME}"
if [ \$? -ne 0 ]; then exit 1; fi
fi
aptly repo -config="${APTLY_CONFIG_FILE}" -with-packages show "${REPO_NAME}"
if [ \$? -ne 0 ]; then exit 1; fi
"""
}
}
@ -116,7 +118,7 @@ pipeline {
aptly snapshot -config="${APTLY_CONFIG_FILE}" drop "${FULL_SNAPSHOT_NAME}"
aptly snapshot -config="${APTLY_CONFIG_FILE}" create "${FULL_SNAPSHOT_NAME}" from repo "${REPO_NAME}"
if [ \$? -ne 0 ]; then exit 1; fi
aptly snapshot -config="${APTLY_CONFIG_FILE}" show "${FULL_SNAPSHOT_NAME}"
aptly snapshot -config="${APTLY_CONFIG_FILE}" -with-packages show "${FULL_SNAPSHOT_NAME}"
if [ \$? -ne 0 ]; then exit 1; fi
"""
}
@ -126,7 +128,11 @@ pipeline {
steps {
script {
sh """#!/bin/bash -v
aptly publish -config="${APTLY_CONFIG_FILE}" -distribution="${DISTRIBUTION}" -gpg-key="${GPG_KEY_ID}" snapshot "${FULL_SNAPSHOT_NAME}"
aptly publish -config="${APTLY_CONFIG_FILE}" -distribution="${DISTRIBUTION}" -component="${COMPONENT}" -gpg-key="${GPG_KEY_ID}" -force-overwrite snapshot "${FULL_SNAPSHOT_NAME}"
if [ \$? -ne 0 ]; then exit 1; fi
aptly publish -config="${APTLY_CONFIG_FILE}" list
if [ \$? -ne 0 ]; then exit 1; fi
aptly publish -config="${APTLY_CONFIG_FILE}" show "${DISTRIBUTION}"
if [ \$? -ne 0 ]; then exit 1; fi
"""
}