From 3cf845944ebd1f12786b1c334e6f73af00385079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=ADaz?= Date: Fri, 7 Oct 2016 18:46:07 -0500 Subject: Inject Gerrit variables before anything fails. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building upon d11f7fb, it was noticed that a build step can fail and Jenkins will not execute the rest of the build steps, heading straight into the post-build steps. Since during the build a fatal error may occur, the Gerrit variables may not get defined at all before reaching the email-ext plug-in. This commit moves the recipient list to the beginning of the job definition, so that it gets executed regardless of the build result. Change-Id: I8fe03cd5cbc7eebc176e151b71b890387bc26818 Signed-off-by: Daniel Díaz --- rpb-aosp-hikey.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'rpb-aosp-hikey.yaml') diff --git a/rpb-aosp-hikey.yaml b/rpb-aosp-hikey.yaml index 602714bad7..a5f4b9941e 100644 --- a/rpb-aosp-hikey.yaml +++ b/rpb-aosp-hikey.yaml @@ -60,6 +60,15 @@ builders: - linaro-publish-token: host: builds.96boards.org + - shell: | + CI_MAIL_RECIPIENTS="${GERRIT_CHANGE_OWNER_EMAIL},${GERRIT_EVENT_ACCOUNT_EMAIL}" + CI_MAIL_RECIPIENTS="${CI_MAIL_RECIPIENTS},vishal.bhoj@linaro.org" + CI_MAIL_RECIPIENTS="${CI_MAIL_RECIPIENTS},fathi.boudra@linaro.org" + CI_MAIL_RECIPIENTS="${CI_MAIL_RECIPIENTS},daniel.diaz@linaro.org" + CI_MAIL_RECIPIENTS="${CI_MAIL_RECIPIENTS},ricardo.salveti@linaro.org" + echo "CI_MAIL_RECIPIENTS=${CI_MAIL_RECIPIENTS}" > env_var_parameters + - inject: + properties-file: env_var_parameters - shell: | #!/bin/bash @@ -337,14 +346,9 @@ - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - - shell: | - echo "GERRIT_CHANGE_OWNER_EMAIL=${GERRIT_CHANGE_OWNER_EMAIL}" > env_var_parameters - echo "GERRIT_EVENT_ACCOUNT_EMAIL=${GERRIT_EVENT_ACCOUNT_EMAIL}" >> env_var_parameters - - inject: - properties-file: env_var_parameters publishers: - email-ext: - recipients: '${GERRIT_CHANGE_OWNER_EMAIL},${GERRIT_EVENT_ACCOUNT_EMAIL},vishal.bhoj@linaro.org,daniel.diaz@linaro.org' + recipients: '${CI_MAIL_RECIPIENTS}' content-type: text body: | Build Triggered by: ${GERRIT_CHANGE_SUBJECT}: ${GERRIT_CHANGE_URL} -- cgit v1.2.3