blob: eada01196631ebe375b390c48aa2a7329da05b89 [file] [log] [blame]
Benjamin Copeland7005a5b2020-08-20 12:29:42 +01001- job:
2 name: tf-a-builder
Paul Sokolovsky84380182023-02-15 23:41:28 +07003 node: docker-amd64-tf-a-jammy
Benjamin Copeland7005a5b2020-08-20 12:29:42 +01004 project-type: freestyle
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +03005 concurrent: true
Leonardo Sandoval4fb1d1c2021-12-14 13:36:34 -06006 disabled: false
Benjamin Copeland7005a5b2020-08-20 12:29:42 +01007 defaults: global
Paul Sokolovsky66df8ff2024-10-22 15:41:04 +07008 description: |
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +03009 Trusted Firmware A (TF-A) builder
Benjamin Copeland7005a5b2020-08-20 12:29:42 +010010 properties:
11 - build-discarder:
Chris Kay9666e882022-08-25 15:53:44 +010012 days-to-keep: 15
Paul Sokolovsky94764bb2023-02-09 17:25:17 +070013 artifact-num-to-keep: 40000
Benjamin Copeland7005a5b2020-08-20 12:29:42 +010014 parameters:
15 - string:
16 name: import_cc
Benjamin Copeland7005a5b2020-08-20 12:29:42 +010017 - string:
Leonardo Sandovala2572ae2021-12-14 12:49:17 -060018 name: TEST_CONFIG
19 description: |
20 Original test configuration.
21 - string:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030022 name: TEST_DESC
Leonardo Sandovala2572ae2021-12-14 12:49:17 -060023 description: |
24 Expanded and normalized test configuration, aka "test description"
Benjamin Copeland7005a5b2020-08-20 12:29:42 +010025 - string:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030026 name: TF_GERRIT_PROJECT
Leonardo Sandovalea978dc2020-10-13 11:00:21 -050027 default: 'TF-A/trusted-firmware-a'
Benjamin Copeland7005a5b2020-08-20 12:29:42 +010028 - string:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030029 name: TF_GERRIT_BRANCH
30 default: 'refs/heads/master'
Leonardo Sandoval190a1d42020-10-21 15:55:13 -050031 - string:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030032 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:
Paul Sokolovsky32184f72023-06-13 16:28:26 +030044 name: CI_REFSPEC
45 default: '+refs/heads/master:refs/remotes/origin/master'
46 - string:
Harrison Mutaidfe75772025-06-04 10:43:41 +000047 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:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030052 name: DOCKER_REGISTRY
Harrison Mutaidfe75772025-06-04 10:43:41 +000053 default: ${PRIVATE_CONTAINER_REGISTRY}
54 description: PRIVATE_CONTAINER_REGISTRY is a system-wide environment variable
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030055 - string:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030056 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
Harrison Mutaidfe75772025-06-04 10:43:41 +000060 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.3.tar.gz'
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030061 - 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
Paul Sokolovsky96df8542023-05-11 00:23:05 +030084 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030085 - string:
Paul Sokolovskye01f6052023-02-10 22:12:25 +070086 name: QA_TOOLS_BRANCH
Paul Sokolovsky96df8542023-05-11 00:23:05 +030087 default: 'master'
Paul Sokolovskye01f6052023-02-10 22:12:25 +070088 - string:
Paul Sokolovskybea6e6e2023-10-04 20:26:42 +030089 name: LAVA_RETRIES
Paul Sokolovsky4315f6d2023-10-16 09:30:57 +030090 default: 2
Paul Sokolovskybea6e6e2023-10-04 20:26:42 +030091 description: |
92 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
93 - string:
Paul Sokolovsky92953ab2024-01-17 12:42:11 +070094 name: USE_TUXSUITE_FVP
Paul Sokolovskyc8fdaab2024-04-08 18:17:08 +070095 default: 1
Paul Sokolovsky92953ab2024-01-17 12:42:11 +070096 description: |
Paul Sokolovskyc23cbd72024-01-17 13:08:48 +070097 Whether to submit FVP tests via TuxSuite (instead of LAVA)
Paul Sokolovsky92953ab2024-01-17 12:42:11 +070098 - string:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +030099 name: SHARE_FOLDER
Chris Kay4bbc9692025-06-13 15:24:41 +0100100 default: '/srv/shared/staging/${JOB_NAME}/${BUILD_NUMBER}'
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300101 description: 'Folder containing shared repositories for downstream pipeline jobs'
Benjamin Copeland7005a5b2020-08-20 12:29:42 +0100102 wrappers:
103 - timestamps
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300104 - 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
Paul Sokolovsky8d3a8a92023-12-11 22:23:53 +0300119 - credentials-binding:
120 - text:
Paul Sokolovsky92953ab2024-01-17 12:42:11 +0700121 credential-id: TUXSUITE_TOKEN
122 variable: TUXSUITE_TOKEN
123 - credentials-binding:
124 - text:
Paul Sokolovsky8d3a8a92023-12-11 22:23:53 +0300125 credential-id: ARMCLANG_UBL_CODE
126 variable: ARMCLANG_UBL_CODE
Benjamin Copeland7005a5b2020-08-20 12:29:42 +0100127 builders:
Paul Sokolovsky96df8542023-05-11 00:23:05 +0300128 - shell: |
129 aarch64-none-elf-gcc -v || true
Leonardo Sandoval1291d402020-10-12 14:46:15 -0500130 - shell:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300131 !include-raw: scripts/clone.sh
132 - shell:
Leonardo Sandoval1291d402020-10-12 14:46:15 -0500133 !include-raw: tf-a-builder/builders.sh
Chris Kayad8c5c12022-10-11 10:46:31 +0100134 - inject:
135 properties-file: artefacts/env
136 - shell: |
137 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Paul Sokolovsky378d6852023-06-13 18:50:38 +0300138 echo ${BIN_MODE:-release} >lava-binmode.txt
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300139 - conditional-step:
140 condition-kind: file-exists
141 on-evaluation-failure: dont-run
Chris Kayad8c5c12022-10-11 10:46:31 +0100142 condition-filename: artefacts-lava/job.yaml
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300143 condition-basedir: workspace
144 steps:
145 - shell: |
146 #!/bin/bash
147 set -e
148 DEVICE_TYPE=fvp
Chris Kayad8c5c12022-10-11 10:46:31 +0100149 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
150 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300151 cat << EOF > ${WORKSPACE}/lava.param
152 DEVICE_TYPE=${DEVICE_TYPE}
153 LAVA_SERVER=tf.validation.linaro.org
154 EOF
Leonardo Sandovalb70f1ac2020-10-09 11:52:01 -0500155 publishers:
Leonardo Sandoval96cf0af2020-10-09 16:15:36 -0500156 - archive:
Paul Sokolovsky378d6852023-06-13 18:50:38 +0300157 artifacts: artefacts/**, lava-binmode.txt
Leonardo Sandoval96cf0af2020-10-09 16:15:36 -0500158 latest-only: false
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300159 allow-empty: true
Chris Kay3a984af2025-06-17 16:53:14 +0100160 follow-symlinks: true
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300161 - conditional-publisher:
162 - condition-kind: file-exists
163 on-evaluation-failure: dont-run
Chris Kayad8c5c12022-10-11 10:46:31 +0100164 condition-filename: artefacts-lava/job.yaml
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300165 condition-basedir: workspace
166 action:
167 - postbuildscript:
Paul Sokolovsky96df8542023-05-11 00:23:05 +0300168 mark-unstable-if-failed: true
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300169 builders:
170 - role: SLAVE
171 build-on:
172 - SUCCESS
173 build-steps:
174 - inject:
175 properties-file: ${WORKSPACE}/lava.param
176 - shell: |
Paul Sokolovsky92953ab2024-01-17 12:42:11 +0700177 #!/bin/bash -x
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300178
Paul Sokolovsky92953ab2024-01-17 12:42:11 +0700179 tf-a-job-configs/tf-a-builder/submit-test-job.sh
180 status=$?
Paul Sokolovsky7ef650b2023-03-16 15:16:21 +0700181 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Paul Sokolovsky92953ab2024-01-17 12:42:11 +0700182 if [ $status -ne 0 ]; then
Paul Sokolovsky54ff5662022-12-09 10:23:11 +0300183 echo "LAVA JOB RESULT: 1"
Paul Sokolovsky96df8542023-05-11 00:23:05 +0300184 exit 1
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300185 else
186 echo "LAVA JOB RESULT: 0"
187 fi
Leonardo Sandovala2572ae2021-12-14 12:49:17 -0600188 - postbuildscript:
189 builders:
190 - role: SLAVE
191 build-on:
192 - SUCCESS
193 build-steps:
194 - shell: |
195 #!/bin/bash -e
196 echo "=== Starting expect-post tests ==="
197 ./tf-a-ci-scripts/script/expect-post-runner.sh
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300198 - conditional-publisher:
199 - condition-kind: file-exists
200 on-evaluation-failure: dont-run
201 condition-filename: lava-raw-debug.log
202 condition-basedir: workspace
203 action:
204 - archive:
205 artifacts: lava-raw-debug.log
206 latest-only: false
207 allow-empty: true
Paul Sokolovsky77c5df72023-03-16 14:17:55 +0700208 - archive:
Paul Sokolovsky92953ab2024-01-17 12:42:11 +0700209 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Paul Sokolovsky77c5df72023-03-16 14:17:55 +0700210 latest-only: false
211 allow-empty: true
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300212 - groovy-postbuild:
213 script:
214 !include-raw:
215 - tf-a-builder/postbuild.groovy