HMBXR5601-827 - Add package publish operations

This commit is contained in:
Dan Hawkins 2019-08-27 15:11:54 +01:00
commit 47e4690e2d

View file

@ -56,7 +56,7 @@ pipeline {
steps {
script {
echo "Aptly config file is ${APTLY_CONFIG_FILE}"
sh """!/#bin/bash
sh """#!/bin/bash -v
aptly config show
if [ \$? -ne 0 ]; then exit 1; fi
"""
@ -67,7 +67,7 @@ pipeline {
steps {
script {
echo "Repo name is ${REPO_NAME}"
sh """!/#bin/bash
sh """#!/bin/bash -v
aptly repo -config="${APTLY_CONFIG_FILE}" show "${REPO_NAME}"
if [ \$? -ne 0 ]; then
echo "aptly repo ${REPO_NAME} does not exist; Creating it"
@ -84,7 +84,7 @@ pipeline {
echo "Snapshot name is ${SNAPSHOT_NAME}"
FULL_SNAPSHOT_NAME = "${REPO_NAME}_${SNAPSHOT_NAME}"
echo "Full Snapshot name is ${FULL_SNAPSHOT_NAME}"
sh """!/#bin/bash
sh """#!/bin/bash -v
# This errors if the snapshot exists already; Ignore it
aptly snapshot -config="${APTLY_CONFIG_FILE}" create "${FULL_SNAPSHOT_NAME}" from repo "${REPO_NAME}"
"""