diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-05-19 13:06:35 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2017-05-19 13:13:13 +0000 |
commit | a6b4b7c0a3e8ca6d39314c7e4e90bfdf37a2af40 (patch) | |
tree | 71676eac462e0ee569e0fa84a7bc8c50c1db0e13 /tcwg-trigger-binutils.yaml | |
parent | 0c99f3b6c5b420aa9db1dd493cae694d407199f5 (diff) |
tcwg-trigger-binutils: Compare results with previous build.
Change-Id: I5d10d6c3afd5f8647a87e657d9d4574c84050441
Diffstat (limited to 'tcwg-trigger-binutils.yaml')
-rw-r--r-- | tcwg-trigger-binutils.yaml | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/tcwg-trigger-binutils.yaml b/tcwg-trigger-binutils.yaml index 08300653..765332f2 100644 --- a/tcwg-trigger-binutils.yaml +++ b/tcwg-trigger-binutils.yaml @@ -13,6 +13,11 @@ - build-discarder: days-to-keep: 30 num-to-keep: 30 + parameters: + - string: + name: ref_build + default: 'previous' + description: 'Reference build for comparison, e.g., "lastSuccess" or "previous" or job number or empty string to skip comparison' disabled: false node: tcwg-x86_64-dev-01-short retry-count: 3 @@ -38,8 +43,42 @@ # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' - - build-name: - name: '#${BUILD_NUMBER}-${ENV,var="binutils_rev"}' builders: + - shell: | + #!/bin/bash + + set -ex + + shopt -s extglob + + cat << EOF > binutils_parameters + log_name=${JOB_NAME}-${BUILD_NUMBER}/\$builder_type.\$target + dont_fail=false + EOF + + if [ x"$ref_build" != x ] ; then + case "$ref_build" in + lastSuccess) ref_build_num=$(wget -q --no-check-certificate -O - "${JOB_URL}lastSuccessfulBuild/buildNumber") ;; + previous) ref_build_num=$(wget -q --no-check-certificate -O - "${JOB_URL}lastCompletedBuild/buildNumber") ;; + [1-9]*([0-9])) ref_build_num="$ref_build" ;; + *) echo "ERROR: Cannot handle ref_build: $ref_build"; exit 1 ;; + esac + + # Scrambled indentation because of here-doc + cat << EOF > compare_results_parameters + ref_logs=${JOB_NAME}-{$ref_build_num} + new_logs=${JOB_NAME}-${BUILD_NUMBER} + EOF + fi - trigger-builds: - - project: 'tcwg-binutils' + - project: tcwg-binutils + property-file: binutils_parameters + block: true + - conditional-step: + condition-kind: file-exists + condition-filename: compare_results_parameters + steps: + - trigger-builds: + - project: tcwg-compare-results + property-file: compare_results_parameters + block: true |