From 8af06d1a238b4d3b3191bcca043e2271696fb9f3 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Tue, 18 Aug 2020 10:55:54 -0700 Subject: [PATCH] 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 --- jjb/lf-release-management-jobs.yaml | 3 +++ releasenotes/notes/fix-release-announce-job-3686ac2f8a598aca.yaml | 7 +++++++ shell/release-announce.sh | 7 ++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-release-announce-job-3686ac2f8a598aca.yaml 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 -- 2.16.6