blob: b9017a990b3fd685c020601fb660eb1a9528dc37 [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:
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030019 name: TEST_CONFIG
20 description: |
21 Original test configuration.
22 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050023 name: TEST_DESC
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030024 description: |
25 Expanded and normalized test configuration, aka "test description"
Fathi Boudra18eca5c2020-01-16 17:50:42 +020026 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050027 name: TF_GERRIT_PROJECT
Fathi Boudra18eca5c2020-01-16 17:50:42 +020028 default: 'TF-A/trusted-firmware-a'
29 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050030 name: TF_GERRIT_BRANCH
Fathi Boudra18eca5c2020-01-16 17:50:42 +020031 default: 'refs/heads/master'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050032 - string:
33 name: TF_GERRIT_REFSPEC
34 default: '+refs/heads/master:refs/remotes/origin/master'
35 - string:
36 name: TFTF_GERRIT_PROJECT
37 default: 'TF-A/tf-a-tests'
38 - string:
39 name: TFTF_GERRIT_BRANCH
40 default: 'refs/heads/master'
41 - string:
42 name: TFTF_GERRIT_REFSPEC
43 default: '+refs/heads/master:refs/remotes/origin/master'
44 - string:
45 name: DOCKER_REGISTRY
46 default: '987685672616.dkr.ecr.us-east-1.amazonaws.com'
47 - string:
48 name: ARMLMD_LICENSE_FILE
Riku Voipioaf06a082021-08-24 13:58:13 +030049 default: '27000@flexnet.trustedfirmware.org'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050050 - string:
51 name: JUNO_ROOTFS_URL
52 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
53 - string:
54 name: MBEDTLS_URL
Manish V Badarkhe2043c932021-04-14 12:38:29 +010055 default: 'https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.26.0.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000056 - string:
57 name: GERRIT_PATCHSET_NUMBER
58 default: ''
59 - string:
60 name: GERRIT_CHANGE_NUMBER
61 default: ''
62 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000063 name: GERRIT_HOST
64 default: 'review.trustedfirmware.org'
65 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000066 name: QA_SERVER_TEAM
67 default: 'tf'
68 - string:
69 name: QA_SERVER_PROJECT
70 default: 'tf-a'
71 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050072 name: QA_SERVER_VERSION
73 default: ${BUILD_NUMBER}
74 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000075 name: QA_SERVER
76 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050077 - string:
78 name: QA_TOOLS_REPO
79 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050080 - string:
81 name: SHARE_FOLDER
82 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
83 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020084 wrappers:
85 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +010086 - timeout:
87 timeout: 120
88 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +000089 - credentials-binding:
90 - text:
91 credential-id: QA_REPORTS_TOKEN
92 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -060093 - credentials-binding:
94 - text:
95 credential-id: LAVA_USER_TF
96 variable: LAVA_USER
97 - credentials-binding:
98 - text:
99 credential-id: LAVA_TOKEN_TF
100 variable: LAVA_TOKEN
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200101 builders:
102 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500103 !include-raw: scripts/clone.sh
104 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200105 !include-raw: tf-a-builder/builders.sh
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500106 - conditional-step:
107 condition-kind: file-exists
108 on-evaluation-failure: dont-run
109 condition-filename: artefacts/debug/job.yaml
110 condition-basedir: workspace
111 steps:
112 - shell: |
113 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500114 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500115 DEVICE_TYPE=fvp
116 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts/debug/job.yaml
117 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts/debug/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100118 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500119 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000120 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500121 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200122 publishers:
123 - archive:
124 artifacts: 'artefacts/**'
125 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500126 allow-empty: true
127 - conditional-publisher:
128 - condition-kind: file-exists
129 on-evaluation-failure: dont-run
130 condition-filename: artefacts/debug/job.yaml
131 condition-basedir: workspace
132 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000133 - postbuildscript:
134 builders:
135 - role: SLAVE
136 build-on:
137 - SUCCESS
138 build-steps:
139 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100140 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500141 - shell: |
142 #!/bin/bash
143
144 squad='tf-a-job-configs/tf-a-builder/squad.sh'
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500145 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
146 # so CI needs to resubmit the job, at most three times:
147 # Juno jobs may fail due to LAVA lab infrastructure issues (see
148 # https://projects.linaro.org/browse/LSS-2128)
149 # FVP jobs may hang at some particular TFTF test (see
150 # https://linaro.atlassian.net/browse/TFC-176)
Leonardo Sandovale9450132021-04-19 13:51:11 -0500151 if ! $squad; then
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500152 if ! $squad; then
Leonardo Sandovale9450132021-04-19 13:51:11 -0500153 if ! $squad; then
154 echo "LAVA JOB RESULT: 1"
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500155 else
156 echo "LAVA JOB RESULT: 0"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500157 fi
158 else
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500159 echo "LAVA JOB RESULT: 0"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500160 fi
161 else
162 echo "LAVA JOB RESULT: 0"
163 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300164 - postbuildscript:
165 builders:
166 - role: SLAVE
167 build-on:
168 - SUCCESS
169 build-steps:
170 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300171 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300172 echo "=== Starting expect-post tests ==="
173 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600174 - conditional-publisher:
175 - condition-kind: file-exists
176 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700177 condition-filename: lava-raw-debug.log
178 condition-basedir: workspace
179 action:
180 - archive:
181 artifacts: lava-raw-debug.log
182 latest-only: false
183 allow-empty: true
184 - conditional-publisher:
185 - condition-kind: file-exists
186 on-evaluation-failure: dont-run
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600187 condition-filename: lava.log
188 condition-basedir: workspace
189 action:
190 - archive:
Leonardo Sandoval8750d372021-09-06 18:14:40 -0500191 artifacts: lava.log, lava-uart?.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600192 latest-only: false
193 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000194 - groovy-postbuild:
195 script:
196 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100197 - tf-a-builder/postbuild.groovy