HMBXR5601-827 - Publish package
This commit is contained in:
parent
e4b42daad4
commit
95c87fad2b
1 changed files with 16 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
stage('Create snapshot - if not already there') {
|
||||
stage('Create snapshot') {
|
||||
steps {
|
||||
script {
|
||||
echo "Snapshot name is ${SNAPSHOT_NAME}"
|
||||
|
|
@ -109,6 +109,21 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
stage('Publish snapshot') {
|
||||
steps {
|
||||
script {
|
||||
echo "Snapshot name is ${SNAPSHOT_NAME}"
|
||||
FULL_SNAPSHOT_NAME = "${REPO_NAME}_${SNAPSHOT_NAME}"
|
||||
echo "Full Snapshot name is ${FULL_SNAPSHOT_NAME}"
|
||||
sh """#!/bin/bash -v
|
||||
# This errors if the published repo exists already; Ignore it
|
||||
aptly publish -config="${APTLY_CONFIG_FILE}" drop "${DISTRIBUTION}"
|
||||
aptly publish -config="${APTLY_CONFIG_FILE}" -distribution="${DISTRIBUTION}" -gpg-key="${GPG_KEY_ID}" snapshot "${FULL_SNAPSHOT_NAME}"
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue