blob: 8581df7f5ed5d0fe0daece52a5d30abb2aabc937 [file] [log] [blame]
Fathi Boudra9e402bf2019-12-05 11:16:41 +02001- job:
2 name: tf-a-builder
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05003 node: docker-amd64-tf-a-bionic
Fathi Boudra9e402bf2019-12-05 11:16:41 +02004 project-type: freestyle
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05005 concurrent: true
6 disabled: false
Fathi Boudra9e402bf2019-12-05 11:16:41 +02007 defaults: global
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05008 Description: |
9 Trusted Firmware A (TF-A) builder
Fathi Boudra9e402bf2019-12-05 11:16:41 +020010 properties:
11 - build-discarder:
Paul Sokolovskyaa016c12021-11-11 12:20:11 +030012 days-to-keep: 45
Riku Voipiobc87be22020-09-04 15:56:09 +030013 - authorization:
Leonardo Sandovalebca8822021-01-25 18:20:04 -060014 !include: authorization.yaml.inc
Fathi Boudra9e402bf2019-12-05 11:16:41 +020015 parameters:
16 - string:
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050017 name: import_cc
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050018 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050019 name: TEST_DESC
Fathi Boudra18eca5c2020-01-16 17:50:42 +020020 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050021 name: TF_GERRIT_PROJECT
Fathi Boudra18eca5c2020-01-16 17:50:42 +020022 default: 'TF-A/trusted-firmware-a'
23 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050024 name: TF_GERRIT_BRANCH
Fathi Boudra18eca5c2020-01-16 17:50:42 +020025 default: 'refs/heads/master'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050026 - string:
27 name: TF_GERRIT_REFSPEC
28 default: '+refs/heads/master:refs/remotes/origin/master'
29 - string:
30 name: TFTF_GERRIT_PROJECT
31 default: 'TF-A/tf-a-tests'
32 - string:
33 name: TFTF_GERRIT_BRANCH
34 default: 'refs/heads/master'
35 - string:
36 name: TFTF_GERRIT_REFSPEC
37 default: '+refs/heads/master:refs/remotes/origin/master'
38 - string:
39 name: DOCKER_REGISTRY
40 default: '987685672616.dkr.ecr.us-east-1.amazonaws.com'
41 - string:
42 name: ARMLMD_LICENSE_FILE
Riku Voipioaf06a082021-08-24 13:58:13 +030043 default: '27000@flexnet.trustedfirmware.org'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050044 - string:
45 name: JUNO_ROOTFS_URL
46 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
47 - string:
48 name: MBEDTLS_URL
Manish V Badarkhe2043c932021-04-14 12:38:29 +010049 default: 'https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.26.0.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000050 - string:
51 name: GERRIT_PATCHSET_NUMBER
52 default: ''
53 - string:
54 name: GERRIT_CHANGE_NUMBER
55 default: ''
56 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000057 name: GERRIT_HOST
58 default: 'review.trustedfirmware.org'
59 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000060 name: QA_SERVER_TEAM
61 default: 'tf'
62 - string:
63 name: QA_SERVER_PROJECT
64 default: 'tf-a'
65 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050066 name: QA_SERVER_VERSION
67 default: ${BUILD_NUMBER}
68 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000069 name: QA_SERVER
70 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050071 - string:
72 name: QA_TOOLS_REPO
73 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050074 - string:
75 name: SHARE_FOLDER
76 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
77 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020078 wrappers:
79 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +010080 - timeout:
81 timeout: 120
82 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +000083 - credentials-binding:
84 - text:
85 credential-id: QA_REPORTS_TOKEN
86 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -060087 - credentials-binding:
88 - text:
89 credential-id: LAVA_USER_TF
90 variable: LAVA_USER
91 - credentials-binding:
92 - text:
93 credential-id: LAVA_TOKEN_TF
94 variable: LAVA_TOKEN
Fathi Boudra9e402bf2019-12-05 11:16:41 +020095 builders:
96 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050097 !include-raw: scripts/clone.sh
98 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +020099 !include-raw: tf-a-builder/builders.sh
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500100 - conditional-step:
101 condition-kind: file-exists
102 on-evaluation-failure: dont-run
103 condition-filename: artefacts/debug/job.yaml
104 condition-basedir: workspace
105 steps:
106 - shell: |
107 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500108 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500109 DEVICE_TYPE=fvp
110 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts/debug/job.yaml
111 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts/debug/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100112 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500113 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000114 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500115 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200116 publishers:
117 - archive:
118 artifacts: 'artefacts/**'
119 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500120 allow-empty: true
121 - conditional-publisher:
122 - condition-kind: file-exists
123 on-evaluation-failure: dont-run
124 condition-filename: artefacts/debug/job.yaml
125 condition-basedir: workspace
126 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000127 - postbuildscript:
128 builders:
129 - role: SLAVE
130 build-on:
131 - SUCCESS
132 build-steps:
133 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100134 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500135 - shell: |
136 #!/bin/bash
137
138 squad='tf-a-job-configs/tf-a-builder/squad.sh'
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500139 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
140 # so CI needs to resubmit the job, at most three times:
141 # Juno jobs may fail due to LAVA lab infrastructure issues (see
142 # https://projects.linaro.org/browse/LSS-2128)
143 # FVP jobs may hang at some particular TFTF test (see
144 # https://linaro.atlassian.net/browse/TFC-176)
Leonardo Sandovale9450132021-04-19 13:51:11 -0500145 if ! $squad; then
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500146 if ! $squad; then
Leonardo Sandovale9450132021-04-19 13:51:11 -0500147 if ! $squad; then
148 echo "LAVA JOB RESULT: 1"
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500149 else
150 echo "LAVA JOB RESULT: 0"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500151 fi
152 else
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500153 echo "LAVA JOB RESULT: 0"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500154 fi
155 else
156 echo "LAVA JOB RESULT: 0"
157 fi
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600158 - conditional-publisher:
159 - condition-kind: file-exists
160 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700161 condition-filename: lava-raw-debug.log
162 condition-basedir: workspace
163 action:
164 - archive:
165 artifacts: lava-raw-debug.log
166 latest-only: false
167 allow-empty: true
168 - conditional-publisher:
169 - condition-kind: file-exists
170 on-evaluation-failure: dont-run
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600171 condition-filename: lava.log
172 condition-basedir: workspace
173 action:
174 - archive:
Leonardo Sandoval8750d372021-09-06 18:14:40 -0500175 artifacts: lava.log, lava-uart?.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600176 latest-only: false
177 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000178 - groovy-postbuild:
179 script:
180 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100181 - tf-a-builder/postbuild.groovy