blob: ca9c9fced5189b74693e94248c137769cb0db63d [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:
Chris Kaybb674402025-06-24 15:20:02 +010011 - build-discarder:
12 days-to-keep: 15
Benjamin Copeland7005a5b2020-08-20 12:29:42 +010013 parameters:
Chris Kaybb674402025-06-24 15:20:02 +010014 - string:
15 name: import_cc
16 - string:
17 name: TEST_CONFIG
18 description: |
19 Original test configuration.
20 - string:
21 name: TEST_DESC
22 description: |
23 Expanded and normalized test configuration, aka "test description"
24 - string:
25 name: TF_GERRIT_PROJECT
26 default: TF-A/trusted-firmware-a
27 - string:
28 name: TF_GERRIT_BRANCH
Chris Kayd322c4e2025-08-06 09:16:56 +010029 default: refs/heads/master
Chris Kaybb674402025-06-24 15:20:02 +010030 - string:
31 name: TF_GERRIT_REFSPEC
32 default: +refs/heads/master:refs/remotes/origin/master
33 - string:
34 name: TFTF_GERRIT_PROJECT
35 default: TF-A/tf-a-tests
36 - string:
37 name: TFTF_GERRIT_BRANCH
Chris Kayd322c4e2025-08-06 09:16:56 +010038 default: refs/heads/master
Chris Kaybb674402025-06-24 15:20:02 +010039 - string:
40 name: TFTF_GERRIT_REFSPEC
41 default: +refs/heads/master:refs/remotes/origin/master
42 - string:
43 name: CI_REFSPEC
44 default: +refs/heads/master:refs/remotes/origin/master
45 - string:
46 name: JOBS_REFSPEC
47 default: refs/heads/master
48 description: |
49 tf-a-job-configs refspec to use. The master branch is used by default.
50 - string:
51 name: DOCKER_REGISTRY
52 default: ${PRIVATE_CONTAINER_REGISTRY}
53 description: PRIVATE_CONTAINER_REGISTRY is a system-wide environment variable
54 - string:
55 name: JUNO_ROOTFS_URL
56 default: http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz
57 - string:
58 name: MBEDTLS_URL
59 default: https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.3.tar.gz
60 - string:
61 name: GERRIT_PATCHSET_NUMBER
62 default: ""
63 - string:
64 name: GERRIT_CHANGE_NUMBER
65 default: ""
66 - string:
67 name: GERRIT_HOST
68 default: review.trustedfirmware.org
69 - string:
Chris Kaybb674402025-06-24 15:20:02 +010070 name: QA_TOOLS_REPO
71 default: https://git.gitlab.arm.com/tooling/qa-tools.git
72 - string:
73 name: QA_TOOLS_BRANCH
74 default: master
75 - string:
76 name: LAVA_RETRIES
77 default: 2
78 description: |
79 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
80 - string:
81 name: USE_TUXSUITE_FVP
82 default: 1
83 description: |
84 Whether to submit FVP tests via TuxSuite (instead of LAVA)
85 - string:
86 name: SHARE_FOLDER
87 default: /srv/shared/staging/${JOB_NAME}/${BUILD_NUMBER}
88 description: Folder containing shared repositories for downstream pipeline jobs
Benjamin Copeland7005a5b2020-08-20 12:29:42 +010089 wrappers:
Chris Kaybb674402025-06-24 15:20:02 +010090 - timestamps
91 - timeout:
92 timeout: 120
93 fail: true
94 - credentials-binding:
95 - text:
Chris Kaybb674402025-06-24 15:20:02 +010096 credential-id: LAVA_USER_TF
97 variable: LAVA_USER
98 - credentials-binding:
99 - text:
100 credential-id: LAVA_TOKEN_TF
101 variable: LAVA_TOKEN
102 - credentials-binding:
103 - text:
104 credential-id: TUXSUITE_TOKEN
105 variable: TUXSUITE_TOKEN
106 - credentials-binding:
107 - text:
108 credential-id: ARMCLANG_UBL_CODE
109 variable: ARMCLANG_UBL_CODE
Benjamin Copeland7005a5b2020-08-20 12:29:42 +0100110 builders:
Chris Kaybb674402025-06-24 15:20:02 +0100111 - shell: |
112 aarch64-none-elf-gcc -v || true
113 - shell: !include-raw: scripts/clone.sh
114 - shell: !include-raw: tf-a-builder/builders.sh
115 - inject:
116 properties-file: artefacts/env
117 - shell: |
118 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
119 echo ${BIN_MODE:-release} >lava-binmode.txt
120 - conditional-step:
121 condition-kind: file-exists
122 on-evaluation-failure: dont-run
123 condition-filename: artefacts-lava/job.yaml
124 condition-basedir: workspace
125 steps:
126 - shell: |
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300127 #!/bin/bash
128 set -e
129 DEVICE_TYPE=fvp
Chris Kayad8c5c12022-10-11 10:46:31 +0100130 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
131 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300132 cat << EOF > ${WORKSPACE}/lava.param
133 DEVICE_TYPE=${DEVICE_TYPE}
134 LAVA_SERVER=tf.validation.linaro.org
135 EOF
Leonardo Sandovalb70f1ac2020-10-09 11:52:01 -0500136 publishers:
Chris Kaybb674402025-06-24 15:20:02 +0100137 - archive:
138 artifacts: artefacts/**, lava-binmode.txt
139 latest-only: false
140 allow-empty: true
141 follow-symlinks: true
142 - conditional-publisher:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300143 - condition-kind: file-exists
144 on-evaluation-failure: dont-run
Chris Kayad8c5c12022-10-11 10:46:31 +0100145 condition-filename: artefacts-lava/job.yaml
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300146 condition-basedir: workspace
147 action:
Chris Kaybb674402025-06-24 15:20:02 +0100148 - postbuildscript:
149 mark-unstable-if-failed: true
150 builders:
151 - role: SLAVE
152 build-on:
153 - SUCCESS
154 build-steps:
155 - inject:
156 properties-file: ${WORKSPACE}/lava.param
157 - shell: |
158 #!/bin/bash -x
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300159
Chris Kaybb674402025-06-24 15:20:02 +0100160 tf-a-job-configs/tf-a-builder/submit-test-job.sh
161 status=$?
162 tf-a-job-configs/tf-a-builder/lava-log-process.sh
163 if [ $status -ne 0 ]; then
164 echo "LAVA JOB RESULT: 1"
165 exit 1
166 else
167 echo "LAVA JOB RESULT: 0"
168 fi
169 - postbuildscript:
170 builders:
171 - role: SLAVE
172 build-on:
173 - SUCCESS
174 build-steps:
175 - shell: |
176 #!/bin/bash -e
177 echo "=== Starting expect-post tests ==="
178 ./tf-a-ci-scripts/script/expect-post-runner.sh
179 - conditional-publisher:
Paul Sokolovskyefa8beb2021-11-08 13:47:59 +0300180 - condition-kind: file-exists
181 on-evaluation-failure: dont-run
182 condition-filename: lava-raw-debug.log
183 condition-basedir: workspace
184 action:
Chris Kaybb674402025-06-24 15:20:02 +0100185 - archive:
186 artifacts: lava-raw-debug.log
187 latest-only: false
188 allow-empty: true
189 - archive:
190 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
191 latest-only: false
192 allow-empty: true
193 - groovy-postbuild:
194 script: !include-raw:
195 - tf-a-builder/postbuild.groovy