NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
# Fetch the release-schema.yaml
wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/release-schema.yaml
NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
# Fetch the release-schema.yaml
wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/release-schema.yaml
echo "RELEASE FILES ARE AS FOLLOWS: $release_files"
if (( $(grep -c . <<<"$release_files") > 1 )); then
echo "RELEASE FILES ARE AS FOLLOWS: $release_files"
if (( $(grep -c . <<<"$release_files") > 1 )); then
-wget --quiet -P "$PATCH_DIR" "${LOGS_URL}"staging-repo.txt.gz
+LOGS_URL=${LOGS_URL%/} # strip any trailing '/'
+echo "wget -P $PATCH_DIR ${LOGS_URL}/staging-repo.txt.gz"
+wget -P "$PATCH_DIR" "${LOGS_URL}/"staging-repo.txt.gz
nexus_release(){
for staging_url in $(zcat "$PATCH_DIR"/staging-repo.txt.gz | awk -e '{print $2}'); do
# extract the domain name from URL
nexus_release(){
for staging_url in $(zcat "$PATCH_DIR"/staging-repo.txt.gz | awk -e '{print $2}'); do
# extract the domain name from URL
- wget --quiet "${LOGS_URL}"/patches/{"${PROJECT}".bundle,taglist.log.gz}
+ echo "wget ${LOGS_URL}/patches/{${PROJECT//\//-}.bundle,taglist.log.gz}"
+ wget "${LOGS_URL}"/patches/{"${PROJECT//\//-}".bundle,taglist.log.gz}
allowed_version_regex="^((v?)([0-9]+)\.([0-9]+)\.([0-9]+))$"
if [[ ! $VERSION =~ $allowed_version_regex ]]; then
echo "The version $VERSION is not a semantic valid version"
allowed_version_regex="^((v?)([0-9]+)\.([0-9]+)\.([0-9]+))$"
if [[ ! $VERSION =~ $allowed_version_regex ]]; then
echo "The version $VERSION is not a semantic valid version"
sigul --batch -c "$SIGUL_CONFIG" sign-git-tag "$SIGUL_KEY" "$VERSION" < "$SIGUL_PASSWORD"
echo "Showing latest signature for $PROJECT:"
gpg --import "$SIGNING_PUBKEY"
sigul --batch -c "$SIGUL_CONFIG" sign-git-tag "$SIGUL_KEY" "$VERSION" < "$SIGUL_PASSWORD"
echo "Showing latest signature for $PROJECT:"
gpg --import "$SIGNING_PUBKEY"
git tag -v "$VERSION"
########## Merge Part ##############
if [[ "$JOB_NAME" =~ "merge" ]]; then
echo "Running merge"
gerrit_ssh=$(echo "$GERRIT_URL" | awk -F"/" '{print $3}')
git tag -v "$VERSION"
########## Merge Part ##############
if [[ "$JOB_NAME" =~ "merge" ]]; then
echo "Running merge"
gerrit_ssh=$(echo "$GERRIT_URL" | awk -F"/" '{print $3}')
git config user.name "$RELEASE_USERNAME"
git config user.email "$RELEASE_EMAIL"
echo -e "Host $gerrit_ssh\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
git config user.name "$RELEASE_USERNAME"
git config user.email "$RELEASE_EMAIL"
echo -e "Host $gerrit_ssh\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config