blob: 0be88a95d4e8d865f5da3bee8271e0929f7b2904 [file] [log] [blame]
Fathi Boudra9e402bf2019-12-05 11:16:41 +02001- job:
2 name: tf-a-builder
Boyan Karatotev5c87c072023-02-10 11:04:58 +00003 node: docker-amd64-tf-a-jammy
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
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07008 description: |
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05009 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
Paul Sokolovsky2b0d0112023-01-23 23:08:49 +070013 artifact-num-to-keep: 40000
Riku Voipiobc87be22020-09-04 15:56:09 +030014 - authorization:
Leonardo Sandovalebca8822021-01-25 18:20:04 -060015 !include: authorization.yaml.inc
Fathi Boudra9e402bf2019-12-05 11:16:41 +020016 parameters:
17 - string:
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050018 name: import_cc
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050019 - string:
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030020 name: TEST_CONFIG
21 description: |
22 Original test configuration.
23 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050024 name: TEST_DESC
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030025 description: |
26 Expanded and normalized test configuration, aka "test description"
Fathi Boudra18eca5c2020-01-16 17:50:42 +020027 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050028 name: TF_GERRIT_PROJECT
Fathi Boudra18eca5c2020-01-16 17:50:42 +020029 default: 'TF-A/trusted-firmware-a'
30 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050031 name: TF_GERRIT_BRANCH
Fathi Boudra18eca5c2020-01-16 17:50:42 +020032 default: 'refs/heads/master'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050033 - string:
34 name: TF_GERRIT_REFSPEC
35 default: '+refs/heads/master:refs/remotes/origin/master'
36 - string:
37 name: TFTF_GERRIT_PROJECT
38 default: 'TF-A/tf-a-tests'
39 - string:
40 name: TFTF_GERRIT_BRANCH
41 default: 'refs/heads/master'
42 - string:
43 name: TFTF_GERRIT_REFSPEC
44 default: '+refs/heads/master:refs/remotes/origin/master'
45 - string:
Paul Sokolovsky1d4700c2023-06-12 16:00:16 +030046 name: CI_REFSPEC
47 default: '+refs/heads/master:refs/remotes/origin/master'
48 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050049 name: DOCKER_REGISTRY
Arthur She9296f492025-01-27 21:25:13 -080050 default: ${JENKINS_DOCKER_REGISTRY}
51 description: JENKINS_DOCKER_REGISTRY is a system-wide environment variable
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050052 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050053 name: JUNO_ROOTFS_URL
54 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
55 - string:
56 name: MBEDTLS_URL
Ryan Everettb4f5f8d2024-11-26 11:48:44 +000057 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.2.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000058 - string:
59 name: GERRIT_PATCHSET_NUMBER
60 default: ''
61 - string:
62 name: GERRIT_CHANGE_NUMBER
63 default: ''
64 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000065 name: GERRIT_HOST
66 default: 'review.trustedfirmware.org'
67 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000068 name: QA_SERVER_TEAM
69 default: 'tf'
70 - string:
71 name: QA_SERVER_PROJECT
72 default: 'tf-a'
73 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050074 name: QA_SERVER_VERSION
75 default: ${BUILD_NUMBER}
76 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000077 name: QA_SERVER
78 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050079 - string:
80 name: QA_TOOLS_REPO
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070081 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050082 - string:
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070083 name: QA_TOOLS_BRANCH
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070084 default: 'master'
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070085 - string:
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030086 name: LAVA_RETRIES
Paul Sokolovsky0f5a7ce2023-10-05 10:40:53 +030087 default: 2
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030088 description: |
89 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
90 - string:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030091 name: USE_TUXSUITE_FVP
Paul Sokolovsky53d99672024-01-25 11:45:36 +070092 default: 1
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030093 description: |
Paul Sokolovskydb602df2024-01-17 13:01:50 +070094 Whether to submit FVP tests via TuxSuite (instead of LAVA)
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030095 - string:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050096 name: SHARE_FOLDER
97 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
98 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020099 wrappers:
100 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +0100101 - timeout:
102 timeout: 120
103 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000104 - credentials-binding:
105 - text:
106 credential-id: QA_REPORTS_TOKEN
107 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600108 - credentials-binding:
109 - text:
110 credential-id: LAVA_USER_TF
111 variable: LAVA_USER
112 - credentials-binding:
113 - text:
114 credential-id: LAVA_TOKEN_TF
115 variable: LAVA_TOKEN
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300116 - credentials-binding:
117 - text:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300118 credential-id: TUXSUITE_TOKEN
119 variable: TUXSUITE_TOKEN
120 - credentials-binding:
121 - text:
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300122 credential-id: ARMCLANG_UBL_CODE
123 variable: ARMCLANG_UBL_CODE
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200124 builders:
Paul Sokolovsky69f20912023-05-09 19:07:02 +0300125 - shell: |
126 aarch64-none-elf-gcc -v || true
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200127 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500128 !include-raw: scripts/clone.sh
129 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200130 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000131 - inject:
132 properties-file: artefacts/env
133 - shell: |
134 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300135 echo ${BIN_MODE:-release} >lava-binmode.txt
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500136 - conditional-step:
137 condition-kind: file-exists
138 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000139 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500140 condition-basedir: workspace
141 steps:
142 - shell: |
143 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500144 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500145 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000146 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
147 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100148 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500149 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000150 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500151 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200152 publishers:
153 - archive:
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300154 artifacts: artefacts/**, lava-binmode.txt
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200155 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500156 allow-empty: true
157 - conditional-publisher:
158 - condition-kind: file-exists
159 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000160 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500161 condition-basedir: workspace
162 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000163 - postbuildscript:
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300164 mark-unstable-if-failed: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000165 builders:
166 - role: SLAVE
167 build-on:
168 - SUCCESS
169 build-steps:
170 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100171 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500172 - shell: |
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300173 #!/bin/bash -x
Leonardo Sandovale9450132021-04-19 13:51:11 -0500174
Paul Sokolovskyd11c3202023-12-30 00:27:31 +0300175 tf-a-job-configs/tf-a-builder/submit-test-job.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300176 status=$?
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700177 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300178 if [ $status -ne 0 ]; then
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300179 echo "LAVA JOB RESULT: 1"
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300180 exit 1
Leonardo Sandovale9450132021-04-19 13:51:11 -0500181 else
182 echo "LAVA JOB RESULT: 0"
183 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300184 - postbuildscript:
185 builders:
186 - role: SLAVE
187 build-on:
188 - SUCCESS
189 build-steps:
190 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300191 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300192 echo "=== Starting expect-post tests ==="
193 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600194 - conditional-publisher:
195 - condition-kind: file-exists
196 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700197 condition-filename: lava-raw-debug.log
198 condition-basedir: workspace
199 action:
200 - archive:
201 artifacts: lava-raw-debug.log
202 latest-only: false
203 allow-empty: true
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700204 - archive:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300205 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700206 latest-only: false
207 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000208 - groovy-postbuild:
209 script:
210 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100211 - tf-a-builder/postbuild.groovy