Migrate Arm CI TF L1 (tf-gerrit-tforg-l1) level job
This is the start of a series of patches with the aim to converge CI
approaches between TF-A Arm [1] and Open [2] CIs. Taking the best of
both worlds, this patch migrates from Arm CI the way it triggers the
rest of the jobs and define test groups, all done in
'tf-gerrit-tforg-l1' job. These test groups are further
splitted by 'tf-ci-gateway' job, and finally sending
a single test configuration to 'tf-a-builder' job, the
package builder, where user changes are taken into account and
compiled. The end of the CI flow is 'post-build-lava' job, in charge
of posting to LAVA [3].
As described above, this is a not full Arm CI migration, but a
converge of both CIs. The decision to take the existing Open CI
'tf-a-builder' and 'post-build-lava' jobs as package builder and LAVA
submitter instead of Arm CI jobs 'tf-worker' and 'tf-build-for-lava'
is mainly for *scalability* and *maintainability* reasons. In this
scenario, both reasons nails down to the main job of the CI: build and
test, where the former is done at *isolation* under a containerized
environment, without being tied to master node HW capacity. In other
words, while Arm CI uses master node for all CI computation, from
triggering up to building, the new proposal only uses master node
for triggering & splitting the work (the test groups), then the
building piece is offloaded into a container
node (docker-amd64-tf-a-bionic) [4].
[1] https://jenkins.oss.arm.com/ (this is an internal ci, cannot be
acccess from outside arm)
[2] https://ci.trustedfirmware.org/
[3] https://tf.validation.linaro.org/scheduler/
[4] https://git.trustedfirmware.org/ci/dockerfiles.git/tree/bionic-amd64-tf-a-build/Dockerfile
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I764cc2a4ba381bb83532033e5a950a1dddf6a2f6
diff --git a/tf-gerrit-tforg-l1.yaml b/tf-gerrit-tforg-l1.yaml
new file mode 100644
index 0000000..3c57368
--- /dev/null
+++ b/tf-gerrit-tforg-l1.yaml
@@ -0,0 +1,112 @@
+- job:
+ name: tf-gerrit-tforg-l1
+ node: master
+ project-type: multijob
+ concurrent: true
+ disabled: false
+ description: |
+ Job that triggers for every TF-A patch approved with the Allow-CI+1
+ label on review.trustedfirmware.org.
+ properties:
+ - throttle:
+ option: project
+ enabled: true
+ max-total: 5
+ - build-discarder:
+ days-to-keep: 180
+ num-to-keep: 180
+ - authorization:
+ anonymous:
+ - job-read
+ - job-extended-read
+ lsandov1:
+ - job-read
+ - job-extended-read
+ - job-build
+ - job-cancel
+ - run-update
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'TF-A/trusted-firmware-a'
+ - string:
+ name: GERRIT_BRANCH
+ default: 'master'
+ - string:
+ name: GERRIT_REFSPEC
+ default: 'refs/heads/master'
+ wrappers:
+ - credentials-binding:
+ - ssh-user-private-key:
+ credential-id: TFA_CI_BOT_USER_SSH_KEY
+ key-file-variable: CI_BOT_KEY
+ username-variable: CI_BOT_USERNAME
+ passphrase-variable: ''
+ - workspace-cleanup
+ - timestamps
+ builders:
+ - shell: |-
+ #!/bin/bash
+
+ set -e
+
+ cat << EOF > env.param
+ TF_GERRIT_PROJECT=${GERRIT_PROJECT}
+ TF_GERRIT_BRANCH=${GERRIT_BRANCH}
+ TF_GERRIT_REFSPEC=${GERRIT_REFSPEC}
+ EOF
+
+ - multijob:
+ condition: COMPLETED
+ name: Build and static checks
+ projects:
+ - kill-phase-on: NEVER
+ name: tf-ci-gateway
+ predefined-parameters: |-
+ TEST_GROUPS=tf-l2-scan-build
+ ENABLE_STATIC_CHECK=true
+ property-file: env.param
+
+ - multijob:
+ condition: COMPLETED
+ name: Run doc build check
+ projects:
+ - kill-phase-on: NEVER
+ name: tf-ci-gateway
+ predefined-parameters: |
+ TEST_GROUPS=tf-l1-check-docs
+ property-file: env.param
+
+ - multijob:
+ condition: COMPLETED
+ name: Run build tests
+ projects:
+ - kill-phase-on: NEVER
+ name: tf-ci-gateway
+ predefined-parameters: |
+ TEST_GROUPS=tf-l1-build-fvp tf-l1-build-juno tf-l1-build-clang tf-l1-build-plat
+ property-file: env.param
+
+ - multijob:
+ condition: COMPLETED
+ name: Run boot tests
+ projects:
+ - kill-phase-on: NEVER
+ name: tf-ci-gateway
+ predefined-parameters: |
+ TEST_GROUPS=tf-l1-boot-tests-aarch32 tf-l1-boot-tests-bl2_el3 tf-l1-boot-tests-cortex tf-l1-boot-tests-foundation tf-l1-boot-tests-gicv2 tf-l1-boot-tests-juno tf-l1-boot-tests-misc
+ property-file: env.param
+
+ triggers:
+ - gerrit:
+ server-name: review.trustedfirmware.org
+ projects:
+ - branches:
+ - branch-compare-type: PLAIN
+ branch-pattern: integration
+ project-compare-type: PLAIN
+ project-pattern: TF-A/trusted-firmware-a
+ trigger-on:
+ - comment-added-event:
+ approval-category: "Allow-CI"
+ approval-value: 1