blob: f524801f8c65b32f9951a9e0f350ebe466a54fb4 [file] [log] [blame]
Zachary Leaf5a9a2772024-10-15 15:07:23 +01001- job:
2 name: tf-a-builder-tfa-next
3 node: docker-amd64-tf-a-jammy
4 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07008 description: |
Zachary Leaf5a9a2772024-10-15 15:07:23 +01009 Trusted Firmware A (TF-A) builder for Next
10 properties:
Chris Kay675db4f2025-06-24 14:14:34 +010011 - build-discarder:
12 days-to-keep: 15
13 artifact-num-to-keep: 40000
Zachary Leaf5a9a2772024-10-15 15:07:23 +010014 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: CLONE_REPOS
100 default: tf-a-ci-scripts,trusted-firmware-a
101 description: |
102 Optional arg to clone only specific projects from default list (tf-a-ci-scripts,trusted-firmware-a,tf-a-tests,spm,tf-m-tests,tf-m-extras)
103 - string:
104 name: SHARE_FOLDER
105 default: /srv/shared/${JOB_NAME}/${BUILD_NUMBER}
106 description: Folder containing shared repositories for downstream pipeline jobs
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100107 wrappers:
Chris Kay675db4f2025-06-24 14:14:34 +0100108 - timestamps
109 - timeout:
110 timeout: 120
111 fail: true
112 - credentials-binding:
113 - text:
114 credential-id: QA_REPORTS_TOKEN
115 variable: QA_REPORTS_TOKEN
116 - credentials-binding:
117 - text:
118 credential-id: LAVA_USER_TF
119 variable: LAVA_USER
120 - credentials-binding:
121 - text:
122 credential-id: LAVA_TOKEN_TF
123 variable: LAVA_TOKEN
124 - credentials-binding:
125 - text:
126 credential-id: TUXSUITE_TOKEN
127 variable: TUXSUITE_TOKEN
128 - credentials-binding:
129 - text:
130 credential-id: TUXPUT_ARCHIVE_TOKEN
131 variable: TUXPUT_ARCHIVE_TOKEN
132 - credentials-binding:
133 - text:
134 credential-id: ARMCLANG_UBL_CODE
135 variable: ARMCLANG_UBL_CODE
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100136 builders:
Chris Kay675db4f2025-06-24 14:14:34 +0100137 - shell: |
138 aarch64-none-elf-gcc -v || true
139 - shell: !include-raw: scripts/clone.sh
140 - shell: !include-raw: tf-a-builder/builders.sh
141 - inject:
142 properties-file: artefacts/env
143 - shell: |
144 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
145 echo ${BIN_MODE:-release} >lava-binmode.txt
146 - conditional-step:
147 condition-kind: file-exists
148 on-evaluation-failure: dont-run
149 condition-filename: artefacts-lava/job.yaml
150 condition-basedir: workspace
151 steps:
152 - shell: |
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100153 #!/bin/bash
154 set -e
155 DEVICE_TYPE=fvp
156 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
157 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Tomás Gonzálezfaf116c2025-01-28 09:58:01 +0000158 # The job.yaml file specifies the download URL of the binaries for FVP tests.
159 # Transform this "download" URL to a "publish" URL for uploading files to the S3 bucket.
160 URL_FIP=$(grep -A1 'fip:' ${WORKSPACE}/artefacts-lava/job.yaml | grep 'url:' | sed -E 's+\s*url:\s*++' | sed -E 's+downloads.trustedfirmware.org+publish.trustedfirmware.org/upload+' | sed -E 's+/fip.bin++')
161 URL_BL1=$(grep -A1 'bl1:' ${WORKSPACE}/artefacts-lava/job.yaml | grep 'url:' | sed -E 's+\s*url:\s*++' | sed -E 's+downloads.trustedfirmware.org+publish.trustedfirmware.org/upload+' | sed -E 's+/bl1.bin++')
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100162 cat << EOF > ${WORKSPACE}/lava.param
163 DEVICE_TYPE=${DEVICE_TYPE}
Tomás Gonzálezfaf116c2025-01-28 09:58:01 +0000164 URL_FIP=${URL_FIP}
165 URL_BL1=${URL_BL1}
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100166 LAVA_SERVER=tf.validation.linaro.org
167 EOF
168 publishers:
Chris Kay675db4f2025-06-24 14:14:34 +0100169 - archive:
170 artifacts: artefacts/**, lava-binmode.txt
171 latest-only: false
172 allow-empty: true
173 - conditional-publisher:
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100174 - condition-kind: file-exists
175 on-evaluation-failure: dont-run
176 condition-filename: artefacts-lava/job.yaml
177 condition-basedir: workspace
178 action:
Chris Kay675db4f2025-06-24 14:14:34 +0100179 - postbuildscript:
180 mark-unstable-if-failed: true
181 builders:
182 - role: SLAVE
183 build-on:
184 - SUCCESS
185 build-steps:
186 - inject:
187 properties-file: ${WORKSPACE}/lava.param
188 - shell: |
189 #!/bin/bash -x
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100190
Chris Kay675db4f2025-06-24 14:14:34 +0100191 tf-a-job-configs/tf-a-builder/upload-tfa-next-artifacts.sh
192 tf-a-job-configs/tf-a-builder/submit-test-job.sh
193 status=$?
194 tf-a-job-configs/tf-a-builder/lava-log-process.sh
195 if [ $status -ne 0 ]; then
196 echo "LAVA JOB RESULT: 1"
197 exit 1
198 else
199 echo "LAVA JOB RESULT: 0"
200 fi
201 - postbuildscript:
202 builders:
203 - role: SLAVE
204 build-on:
205 - SUCCESS
206 build-steps:
207 - shell: |
208 #!/bin/bash -e
209 echo "=== Starting expect-post tests ==="
210 ./tf-a-ci-scripts/script/expect-post-runner.sh
211 - conditional-publisher:
Zachary Leaf5a9a2772024-10-15 15:07:23 +0100212 - condition-kind: file-exists
213 on-evaluation-failure: dont-run
214 condition-filename: lava-raw-debug.log
215 condition-basedir: workspace
216 action:
Chris Kay675db4f2025-06-24 14:14:34 +0100217 - archive:
218 artifacts: lava-raw-debug.log
219 latest-only: false
220 allow-empty: true
221 - archive:
222 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
223 latest-only: false
224 allow-empty: true
225 - groovy-postbuild:
226 script: !include-raw:
227 - tf-a-builder/postbuild.groovy