aboutsummaryrefslogtreecommitdiff
path: root/tcwg-llvm-staged-build.yaml
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2017-04-24 09:38:46 +0100
committerRenato Golin <renato.golin@linaro.org>2017-04-24 11:14:15 +0000
commit38df67f3f488549f2083756bdf54400a2ff1525d (patch)
tree541b675fc17d079eb05b1716375d0d4a28a0b8b1 /tcwg-llvm-staged-build.yaml
parent14f5c9a25f7860faf85e7fee10a1991bdd0616df (diff)
tcwg-llvm-staged-build.yaml: Adding 2stage/test triggers
Trying two new triggers: 2nd stage and test-suite, making sure both don't run at the same time, since if we want 2 stages, we only want to test the second stage. Change-Id: Ia0dea292b0c3eedbbe00d23ac52dc9274400569e
Diffstat (limited to 'tcwg-llvm-staged-build.yaml')
-rw-r--r--tcwg-llvm-staged-build.yaml54
1 files changed, 52 insertions, 2 deletions
diff --git a/tcwg-llvm-staged-build.yaml b/tcwg-llvm-staged-build.yaml
index 90180454..863fd120 100644
--- a/tcwg-llvm-staged-build.yaml
+++ b/tcwg-llvm-staged-build.yaml
@@ -28,6 +28,14 @@
name: build_container_tag
default: 'xenial'
description: 'Type of image to use in the container: trusty, xenial.'
+ - bool:
+ name: 2stage
+ default: false
+ description: 'Whether or not to trigger a second stage with this build.'
+ - bool:
+ name: testsuite
+ default: false
+ description: 'Whether or not to trigger a test-suite with this build.'
- string:
name: weight
default: '3'
@@ -62,7 +70,7 @@
builders:
- shell: |
#!/bin/bash
- set -ex
+ set -exu
# Start build container
builder=$(${WORKSPACE}/nodename2hostname.sh $NODE_NAME)
@@ -76,7 +84,7 @@
# Make sure to cleanup build container if something goes
# wrong when preparing the test environment
- if [ x"${BUILD_CONTAINER_CLEANUP}" != x ]; then
+ if [ "${BUILD_CONTAINER_CLEANUP}" != "" ]; then
CONTAINERS_CLEANUP="${BUILD_CONTAINER_CLEANUP}"
trap "${CONTAINERS_CLEANUP}" EXIT
fi
@@ -89,3 +97,45 @@
--linkjobs=${linkjobs} \
--revision=${revision} \
--toolchain=${toolchain}"
+
+ # Chained jobs (FIXME: handle version/targets)
+ fileserver=dev-01.tcwglab
+ url_prefix=~tcwg-buildslave/builds/binaries
+ target=clang+llvm-5.0.0-ci${BUILD_ID}-x86_64-unknown-linux-gnu
+ tarball=${target}.tar.gz
+ toolchain_url="http://${fileserver}/${url_prefix}/${target}/${tarball}"
+
+ # We don't want an infinite chain, so make sure the 3rd stage is off
+ if ${2stage}; then
+ cat << EOF > llvm.params.2stage
+ toolchain=${toolchain_url}
+ 2stage=false
+ EOF
+
+ # If we requested 2 stages and test-suite, only test the 2nd stage
+ elif ${testsuite}; then
+ cat << EOF > llvm.params.testsuite
+ toolchain=${toolchain_url}
+ EOF
+
+ fi
+
+ - conditional-step:
+ condition-kind: file-exists
+ condition-filename: llvm.params.2stage
+ steps:
+ - trigger-builds:
+ - project: 'tcwg-llvm-staged-build'
+ property-file: llvm.params.2stage
+ current-parameters: true
+ block: false
+
+ - conditional-step:
+ condition-kind: file-exists
+ condition-filename: llvm.params.testsuite
+ steps:
+ - trigger-builds:
+ - project: 'tcwg-llvm-testsuite'
+ property-file: llvm.params.testsuite
+ current-parameters: true
+ block: false