blob: a4402a52ebbd809439f428b5d2344ed122b09abd [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:
Chris Kay675db4f2025-06-24 14:14:34 +010011 - build-discarder:
12 days-to-keep: 15
13 artifact-num-to-keep: 40000
Fathi Boudra9e402bf2019-12-05 11:16:41 +020014 parameters:
Chris Kay675db4f2025-06-24 14:14:34 +010015 - string:
16 name: import_cc
17 - string:
18 name: TEST_CONFIG
19 description: |
20 Original test configuration.
21 - string:
22 name: TEST_DESC
23 description: |
24 Expanded and normalized test configuration, aka "test description"
25 - string:
26 name: TF_GERRIT_PROJECT
27 default: TF-A/trusted-firmware-a
28 - string:
29 name: TF_GERRIT_BRANCH
30 default: refs/heads/master
31 - string:
32 name: TF_GERRIT_REFSPEC
33 default: +refs/heads/master:refs/remotes/origin/master
34 - string:
35 name: TFTF_GERRIT_PROJECT
36 default: TF-A/tf-a-tests
37 - string:
38 name: TFTF_GERRIT_BRANCH
39 default: refs/heads/master
40 - string:
41 name: TFTF_GERRIT_REFSPEC
42 default: +refs/heads/master:refs/remotes/origin/master
43 - string:
44 name: CI_REFSPEC
45 default: +refs/heads/master:refs/remotes/origin/master
46 - string:
47 name: JOBS_REFSPEC
48 default: refs/heads/master
49 description: |
50 tf-a-job-configs refspec to use. The master branch is used by default.
51 - string:
52 name: DOCKER_REGISTRY
53 default: ${PRIVATE_CONTAINER_REGISTRY}
54 description: PRIVATE_CONTAINER_REGISTRY is a system-wide environment variable
55 - string:
56 name: JUNO_ROOTFS_URL
57 default: http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz
58 - string:
59 name: MBEDTLS_URL
60 default: https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.3.tar.gz
61 - string:
62 name: GERRIT_PATCHSET_NUMBER
63 default: ""
64 - string:
65 name: GERRIT_CHANGE_NUMBER
66 default: ""
67 - string:
68 name: GERRIT_HOST
69 default: review.trustedfirmware.org
70 - string:
71 name: QA_SERVER_TEAM
72 default: tf
73 - string:
74 name: QA_SERVER_PROJECT
75 default: tf-a
76 - string:
77 name: QA_SERVER_VERSION
78 default: ${BUILD_NUMBER}
79 - string:
80 name: QA_SERVER
81 default: https://qa-reports.linaro.org
82 - string:
83 name: QA_TOOLS_REPO
84 default: https://git.gitlab.arm.com/tooling/qa-tools.git
85 - string:
86 name: QA_TOOLS_BRANCH
87 default: master
88 - string:
89 name: LAVA_RETRIES
90 default: 2
91 description: |
92 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
93 - string:
94 name: USE_TUXSUITE_FVP
95 default: 1
96 description: |
97 Whether to submit FVP tests via TuxSuite (instead of LAVA)
98 - string:
99 name: SHARE_FOLDER
100 default: /srv/shared/${JOB_NAME}/${BUILD_NUMBER}
101 description: Folder containing shared repositories for downstream pipeline jobs
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200102 wrappers:
Chris Kay675db4f2025-06-24 14:14:34 +0100103 - timestamps
104 - timeout:
105 timeout: 120
106 fail: true
107 - credentials-binding:
108 - text:
109 credential-id: QA_REPORTS_TOKEN
110 variable: QA_REPORTS_TOKEN
111 - credentials-binding:
112 - text:
113 credential-id: LAVA_USER_TF
114 variable: LAVA_USER
115 - credentials-binding:
116 - text:
117 credential-id: LAVA_TOKEN_TF
118 variable: LAVA_TOKEN
119 - credentials-binding:
120 - text:
121 credential-id: TUXSUITE_TOKEN
122 variable: TUXSUITE_TOKEN
123 - credentials-binding:
124 - text:
125 credential-id: ARMCLANG_UBL_CODE
126 variable: ARMCLANG_UBL_CODE
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200127 builders:
Chris Kay675db4f2025-06-24 14:14:34 +0100128 - shell: |
129 aarch64-none-elf-gcc -v || true
130 - shell: !include-raw: scripts/clone.sh
131 - shell: !include-raw: tf-a-builder/builders.sh
132 - inject:
133 properties-file: artefacts/env
134 - shell: |
135 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
136 echo ${BIN_MODE:-release} >lava-binmode.txt
137 - conditional-step:
138 condition-kind: file-exists
139 on-evaluation-failure: dont-run
140 condition-filename: artefacts-lava/job.yaml
141 condition-basedir: workspace
142 steps:
143 - shell: |
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500144 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500145 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500146 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000147 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
148 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100149 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500150 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000151 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500152 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200153 publishers:
Chris Kay675db4f2025-06-24 14:14:34 +0100154 - archive:
155 artifacts: artefacts/**, lava-binmode.txt
156 latest-only: false
157 allow-empty: true
158 follow-symlinks: true
159 - conditional-publisher:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500160 - condition-kind: file-exists
161 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000162 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500163 condition-basedir: workspace
164 action:
Chris Kay675db4f2025-06-24 14:14:34 +0100165 - postbuildscript:
166 mark-unstable-if-failed: true
167 builders:
168 - role: SLAVE
169 build-on:
170 - SUCCESS
171 build-steps:
172 - inject:
173 properties-file: ${WORKSPACE}/lava.param
174 - shell: |
175 #!/bin/bash -x
Leonardo Sandovale9450132021-04-19 13:51:11 -0500176
Chris Kay675db4f2025-06-24 14:14:34 +0100177 tf-a-job-configs/tf-a-builder/submit-test-job.sh
178 status=$?
179 tf-a-job-configs/tf-a-builder/lava-log-process.sh
180 if [ $status -ne 0 ]; then
181 echo "LAVA JOB RESULT: 1"
182 exit 1
183 else
184 echo "LAVA JOB RESULT: 0"
185 fi
186 - postbuildscript:
187 builders:
188 - role: SLAVE
189 build-on:
190 - SUCCESS
191 build-steps:
192 - shell: |
193 #!/bin/bash -e
194 echo "=== Starting expect-post tests ==="
195 ./tf-a-ci-scripts/script/expect-post-runner.sh
196 - conditional-publisher:
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600197 - condition-kind: file-exists
198 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700199 condition-filename: lava-raw-debug.log
200 condition-basedir: workspace
201 action:
Chris Kay675db4f2025-06-24 14:14:34 +0100202 - archive:
203 artifacts: lava-raw-debug.log
204 latest-only: false
205 allow-empty: true
206 - archive:
207 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
208 latest-only: false
209 allow-empty: true
210 - groovy-postbuild:
211 script: !include-raw:
212 - tf-a-builder/postbuild.groovy