aboutsummaryrefslogtreecommitdiff
path: root/linaro-hikey-stable-rc-4.4-merge-and-tag.yaml
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2017-09-24 21:32:17 -0500
committerFathi Boudra <fathi.boudra@linaro.org>2017-11-24 14:14:51 +0000
commit379a4a495c79171973048767b86f643756878f41 (patch)
tree1f608f34e64c5bd1d335dde4f8cdf6432fd6e1cc /linaro-hikey-stable-rc-4.4-merge-and-tag.yaml
parentcd6187a1460beb96384ebb3e61e879c1abe52ded (diff)
linaro-hikey-stable-rc-4.4-merge-and-tag: only trigger on RCs
Currently, all builds trigger the trigger job [1], regardless of the git changed being an RC or not, and that job then triggers a build of Openembedded [2]. This undesired behavior may happen, then: 1) An RC commit is pushed, e.g. 4.4.100-rc1, which will trigger a build; all is well. 2) A non-RC commit is pushed, e.g. 4.4.101, which will also trigger a build of Openembedded, using exactly the last RC tag, 4.4.100-rc1. Refactor the code and trigger the build on a conditional step, based on RCs detection. [1] trigger-openembedded-lkft-linaro-hikey-stable-rc-4.4 [2] https://git.linaro.org/ci/job/configs.git/tree/trigger-openembedded-lkft-linaro-hikey-stable-rc-4.4.yaml#n54 Change-Id: I76529ae63b0124e06780af70630f9f1a61acc3a6 Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Diffstat (limited to 'linaro-hikey-stable-rc-4.4-merge-and-tag.yaml')
-rw-r--r--linaro-hikey-stable-rc-4.4-merge-and-tag.yaml35
1 files changed, 19 insertions, 16 deletions
diff --git a/linaro-hikey-stable-rc-4.4-merge-and-tag.yaml b/linaro-hikey-stable-rc-4.4-merge-and-tag.yaml
index 6c0bb29370..46622e5049 100644
--- a/linaro-hikey-stable-rc-4.4-merge-and-tag.yaml
+++ b/linaro-hikey-stable-rc-4.4-merge-and-tag.yaml
@@ -52,31 +52,34 @@
# Find out the kernel version and bail out if it is not a RC
git checkout -B linux-4.4.y linux-stable-rc-4.4/linux-4.4.y
kernel_version=$(make kernelversion)
+ rm -f stable-rc-detected
case "${kernel_version}" in
4.4.*-rc*)
echo "Kernel version: ${kernel_version}"
+
+ # Merge HiKey rebased branch into stable 4.4.y
+ git merge --no-edit sumit-lts/lts-4.4.y-hikey
+
+ # Apply tag
+ tag=${kernel_version}-hikey-$(date +"%Y%m%d")-${BUILD_NUMBER}
+ git tag ${tag}
+
+ # Push tag
+ git push arm64-stable-rc-4.4 ${tag}
+
+ touch stable-rc-detected
;;
*)
echo "Kernel version ${kernel_version} is not a 4.4.y RC."
- exit 0
;;
esac
-
- # Merge HiKey rebased branch into stable 4.4.y
- git merge --no-edit sumit-lts/lts-4.4.y-hikey
-
- # Apply tag
- tag=${kernel_version}-hikey-$(date +"%Y%m%d")-${BUILD_NUMBER}
- git tag ${tag}
-
- # Push tag
- git push arm64-stable-rc-4.4 ${tag}
+ - conditional-step:
+ condition-kind: file-exists
+ condition-filename: stable-rc-detected
+ steps:
+ - trigger-builds:
+ - project: 'trigger-openembedded-lkft-linaro-hikey-stable-rc-4.4'
publishers:
- - trigger-parameterized-builds:
- - project:
- - 'trigger-openembedded-lkft-linaro-hikey-stable-rc-4.4'
- condition: SUCCESS
- trigger-with-no-params: true
- email-ext:
recipients: 'sumit.semwal@linaro.org, fathi.boudra@linaro.org, daniel.diaz@linaro.org'
body: |