Fix email notifications for lfdocs-conf releases 81/65081/5
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 18 Aug 2020 17:55:54 +0000 (10:55 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 18 Aug 2020 19:00:34 +0000 (12:00 -0700)
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 <jwagantall@linuxfoundation.org>
Change-Id: I0dc7b0088851ce8abf8238bc63e8e5bdbfc2ea9b

jjb/lf-release-management-jobs.yaml
releasenotes/notes/fix-release-announce-job-3686ac2f8a598aca.yaml [new file with mode: 0644]
shell/release-announce.sh

index d2f227c..419ffe5 100644 (file)
@@ -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 (file)
index 0000000..944d590
--- /dev/null
@@ -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.
index af4ce69..5f94bc5 100644 (file)
 ##############################################################################
 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