X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;ds=sidebyside;f=shell%2Frelease-job.sh;h=7080a4e6385330c8b63bd35ce101fa30379b4b26;hb=refs%2Ftags%2Fv0.46.0;hp=b764ac1919789a80b2d55c20f5773b0e1358b5b1;hpb=200c13dbad2552db1ba9cfc185b0dc40db863930;p=releng%2Fglobal-jjb.git diff --git a/shell/release-job.sh b/shell/release-job.sh index b764ac19..7080a4e6 100644 --- a/shell/release-job.sh +++ b/shell/release-job.sh @@ -125,6 +125,18 @@ verify_version(){ fi } +verify_version_match_release(){ + wget -P /tmp "${LOGS_URL}/"console.log.gz + echo "INFO: Comparing version $VERSION with log snippet from maven-stage:" + if zgrep "Successfully uploaded" /tmp/console.log.gz | grep "$VERSION"; then + echo "INFO: version $VERSION matches maven-stage artifacts" + else + echo "ERROR: Defined version in release file does not match staging repo artifacts version to be released" + echo " Please make sure maven-stage job selected as candidate and release version are correct" + exit 1 + fi +} + tag(){ # Import public signing key gpg --import "$SIGNING_PUBKEY" @@ -249,6 +261,7 @@ if [[ "$DISTRIBUTION_TYPE" == "maven" ]]; then fi set_variables_maven verify_version + verify_version_match_release maven_release_file elif [[ "$DISTRIBUTION_TYPE" == "container" ]]; then wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/release-container-schema.yaml