From: Jessica Wagantall Date: Tue, 18 Aug 2020 17:55:54 +0000 (-0700) Subject: Fix email notifications for lfdocs-conf releases X-Git-Tag: v0.57.0~4 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F65081%2F5;p=releng%2Fglobal-jjb.git Fix email notifications for lfdocs-conf releases Unfortunatelly the name of the repo does not match the configuration in the code and we need to make sure the email notification announces the corrected name of the project which should be lfdocs-conf. Add a new PROJECT_SLUG variable to use in case the name of the repo is different from its configuration. Issue: IT-20404 Signed-off-by: Jessica Wagantall Change-Id: I0dc7b0088851ce8abf8238bc63e8e5bdbfc2ea9b --- diff --git a/jjb/lf-release-management-jobs.yaml b/jjb/lf-release-management-jobs.yaml index d2f227cc..419ffe59 100644 --- a/jjb/lf-release-management-jobs.yaml +++ b/jjb/lf-release-management-jobs.yaml @@ -13,6 +13,7 @@ build-days-to-keep: 7 build-timeout: 15 disable-job: false + project-slug: "" ##################### # Job Configuration # @@ -27,6 +28,8 @@ build-days-to-keep: "{build-days-to-keep}" builders: + - inject: + properties-content: PROJECT_SLUG={project-slug} - shell: !include-raw-escape: ../shell/release-announce.sh wrappers: diff --git a/releasenotes/notes/fix-release-announce-job-3686ac2f8a598aca.yaml b/releasenotes/notes/fix-release-announce-job-3686ac2f8a598aca.yaml new file mode 100644 index 00000000..944d5902 --- /dev/null +++ b/releasenotes/notes/fix-release-announce-job-3686ac2f8a598aca.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fix email notifications for lfdocs-conf releases. The name of the repo + does not match the configuration in the code. Add a new PROJECT_SLUG + variable to use in case the name of the repo is different from its + configuration. diff --git a/shell/release-announce.sh b/shell/release-announce.sh index af4ce693..5f94bc53 100644 --- a/shell/release-announce.sh +++ b/shell/release-announce.sh @@ -10,7 +10,12 @@ ############################################################################## echo "---> release-announce.sh" -PROJECT="${GERRIT_PROJECT#releng/}" # For releng projects strip the prefix +if [[ $PROJECT_SLUG != "" ]]; then + PROJECT="$PROJECT_SLUG" +else + PROJECT="${GERRIT_PROJECT#releng/}" # For releng projects strip the prefix +fi + TAG_NAME="${GERRIT_REFNAME#refs/tags/}" set -eux -o pipefail