Merge commit 'b9124c312613b4c9bccced8565a1ef8f063955ac'
This commit is contained in:
commit
fc080ad9eb
3 changed files with 17 additions and 4 deletions
|
|
@ -191,7 +191,7 @@ class BuildStampInfo extends GISJsonSerialised {
|
|||
changerevision(revision)
|
||||
}
|
||||
|
||||
void set(String buildstampprefix, String revision) {
|
||||
void set(String buildstampprefix, String revision = '0') {
|
||||
set(buildstampprefix, revision.toInteger())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,19 @@ pipeline {
|
|||
FULL_SNAPSHOT_NAME = "${REPO_NAME}_${SNAPSHOT_NAME}"
|
||||
PACKAGE_VERSION_PREFIX = packagemeta.buildstampinfo.buildstampprefix
|
||||
echo "Full Snapshot name is ${FULL_SNAPSHOT_NAME} containing packages of versions beginning with: ${PACKAGE_VERSION_PREFIX}"
|
||||
// Convert prefix to regular expression
|
||||
PACKAGE_VERSION_PREFIX_SPLIT = PACKAGE_VERSION_PREFIX.split("[.]")
|
||||
PACKAGE_VERSION_REGEX = ''
|
||||
i = 0
|
||||
while(true) {
|
||||
if (i == PACKAGE_VERSION_PREFIX_SPLIT.size() - 1) {
|
||||
PACKAGE_VERSION_REGEX += PACKAGE_VERSION_PREFIX_SPLIT[i]
|
||||
break;
|
||||
}
|
||||
PACKAGE_VERSION_REGEX += PACKAGE_VERSION_PREFIX_SPLIT[i]
|
||||
PACKAGE_VERSION_REGEX += '\\.'
|
||||
i++
|
||||
}
|
||||
sh """#!/bin/bash -v
|
||||
# This errors if the snapshot exists already; Ignore it
|
||||
aptly snapshot -config="${APTLY_CONFIG_FILE}" drop "${FULL_SNAPSHOT_NAME}"
|
||||
|
|
@ -122,7 +135,7 @@ pipeline {
|
|||
aptly snapshot -config="${APTLY_CONFIG_FILE}" create "All_${FULL_SNAPSHOT_NAME}" from repo "${REPO_NAME}"
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
|
||||
aptly snapshot filter -config="/home/repos/gis-aptly-config/gis.conf" "All_${FULL_SNAPSHOT_NAME}" "${FULL_SNAPSHOT_NAME}" 'Version (~ .*${PACKAGE_VERSION_PREFIX}.*)'
|
||||
aptly snapshot filter -config="/home/repos/gis-aptly-config/gis.conf" "All_${FULL_SNAPSHOT_NAME}" "${FULL_SNAPSHOT_NAME}" 'Version (~ .*${PACKAGE_VERSION_REGEX}.*)'
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
aptly snapshot -config="${APTLY_CONFIG_FILE}" -with-packages show "${FULL_SNAPSHOT_NAME}"
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ pipeline {
|
|||
!release.toLowerCase().startsWith("faulty") &&
|
||||
!release.toLowerCase().startsWith("ignore") &&
|
||||
!release.toLowerCase().startsWith("inmainline")) {
|
||||
//echo("Showing release: ${release}")
|
||||
echo("Showing release: ${release}")
|
||||
releases.add(release)
|
||||
} else {
|
||||
//echo("Not showing release: ${release}")
|
||||
echo("Not showing release: ${release}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue