Reset the branch to remove some SOM variant stuff that came from master

This commit is contained in:
Dan Hawkins 2020-06-30 15:54:51 +01:00
commit ed6e997a1a
3 changed files with 17 additions and 4 deletions

View file

@ -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())
}

View file

@ -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

View file

@ -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}")
}
}
}