blob: d4bc4652330201ba13adbd40fead7fa73d711863 [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:
Benjamin Copeland12a152f2022-03-18 13:16:44 +000012 days-to-keep: 15
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
Daniel Boulby98d3e4f2022-10-04 14:04:13 +010055 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-2.28.1.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
Chris Kayf6ff4672022-11-03 13:09:44 +0000106 - inject:
107 properties-file: artefacts/env
108 - shell: |
109 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500110 - conditional-step:
111 condition-kind: file-exists
112 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000113 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500114 condition-basedir: workspace
115 steps:
116 - shell: |
117 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500118 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500119 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000120 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
121 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100122 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500123 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000124 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500125 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200126 publishers:
127 - archive:
Chris Kayf6ff4672022-11-03 13:09:44 +0000128 artifacts: artefacts/**, artefacts-lava/**
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200129 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500130 allow-empty: true
131 - conditional-publisher:
132 - condition-kind: file-exists
133 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000134 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500135 condition-basedir: workspace
136 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000137 - postbuildscript:
138 builders:
139 - role: SLAVE
140 build-on:
141 - SUCCESS
142 build-steps:
143 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100144 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500145 - shell: |
146 #!/bin/bash
147
148 squad='tf-a-job-configs/tf-a-builder/squad.sh'
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500149 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
150 # so CI needs to resubmit the job, at most three times:
151 # Juno jobs may fail due to LAVA lab infrastructure issues (see
152 # https://projects.linaro.org/browse/LSS-2128)
153 # FVP jobs may hang at some particular TFTF test (see
154 # https://linaro.atlassian.net/browse/TFC-176)
Leonardo Sandovale9450132021-04-19 13:51:11 -0500155 if ! $squad; then
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500156 if ! $squad; then
Leonardo Sandovale9450132021-04-19 13:51:11 -0500157 if ! $squad; then
158 echo "LAVA JOB RESULT: 1"
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500159 else
160 echo "LAVA JOB RESULT: 0"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500161 fi
162 else
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500163 echo "LAVA JOB RESULT: 0"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500164 fi
165 else
166 echo "LAVA JOB RESULT: 0"
167 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300168 - postbuildscript:
169 builders:
170 - role: SLAVE
171 build-on:
172 - SUCCESS
173 build-steps:
174 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300175 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300176 echo "=== Starting expect-post tests ==="
177 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600178 - conditional-publisher:
179 - condition-kind: file-exists
180 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700181 condition-filename: lava-raw-debug.log
182 condition-basedir: workspace
183 action:
184 - archive:
185 artifacts: lava-raw-debug.log
186 latest-only: false
187 allow-empty: true
188 - conditional-publisher:
189 - condition-kind: file-exists
190 on-evaluation-failure: dont-run
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600191 condition-filename: lava.log
192 condition-basedir: workspace
193 action:
194 - archive:
Chris Kaydaa73df2022-11-17 10:27:53 +0000195 artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600196 latest-only: false
197 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000198 - groovy-postbuild:
199 script:
200 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100201 - tf-a-builder/postbuild.groovy