X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Frelease-job.sh;h=3a36a579bb25f7fa2398e43d75b8d66878cade01;hb=97b2c167fe54298814d5985f705ac767fd1912be;hp=0ada4617ec283b92fa575d0e2286e9d35c599e1e;hpb=d528f52b9ebd3c9982045e4cb754eb8bd0f1e007;p=releng%2Fglobal-jjb.git diff --git a/shell/release-job.sh b/shell/release-job.sh index 0ada4617..3a36a579 100644 --- a/shell/release-job.sh +++ b/shell/release-job.sh @@ -75,11 +75,17 @@ nexus_release(){ lftools nexus release -v --server https://"$NEXUS_URL" "$STAGING_REPO" echo "Merge will run" echo "lftools nexus release --server https://$NEXUS_URL $STAGING_REPO" - if [[ "$JOB_NAME" =~ "merge" ]]; then + done + #Run the loop twice, to catch errors on either nexus repo + + if [[ "$JOB_NAME" =~ "merge" ]]; then + for staging_url in $(zcat "$PATCH_DIR"/staging-repo.txt.gz | awk -e '{print $2}'); do + NEXUS_URL=$(echo "$staging_url" | sed -e 's|^[^/]*//||' -e 's|/.*$||') + STAGING_REPO=${staging_url#*repositories/} echo "Promoting $STAGING_REPO on $NEXUS_URL." lftools nexus release --server https://"$NEXUS_URL" "$STAGING_REPO" - fi - done + done + fi } @@ -151,8 +157,7 @@ if [ "${LOGS_SERVER}" == 'None' ]; then exit 1 fi -RELEASE_FILE="${RELEASE_FILE:-True}" -if [[ "$RELEASE_FILE" == "True" ]]; then +if $USE_RELEASE_FILE ; then release_files=$(git diff-tree --no-commit-id -r "$GERRIT_PATCHSET_REVISION" --name-only -- "releases/" ".releases/") if (( $(grep -c . <<<"$release_files") > 1 )); then @@ -165,7 +170,7 @@ if [[ "$RELEASE_FILE" == "True" ]]; then fi else - echo "This is job is built with parameters, no release file needed" + echo "This job is built with parameters, no release file needed. Continuing..." release_file="None" fi @@ -211,7 +216,7 @@ echo "DISTRIBUTION_TYPE: $DISTRIBUTION_TYPE" if [[ "$DISTRIBUTION_TYPE" == "maven" ]]; then wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/release-schema.yaml RELEASE_SCHEMA="release-schema.yaml" - if [[ "$RELEASE_FILE" == "True" ]]; then + if $USE_RELEASE_FILE ; then verify_schema fi maven_release_file