Zachary Leaf | 5a9a277 | 2024-10-15 15:07:23 +0100 | [diff] [blame] | 1 | - job: |
| 2 | name: tf-a-main-tfa-next |
| 3 | node: docker-amd64-tf-a-jammy |
| 4 | project-type: multijob |
| 5 | concurrent: true |
| 6 | disabled: false |
| 7 | description: Main CI job for Trusted Firmware Next |
| 8 | properties: |
| 9 | - throttle: |
| 10 | option: project |
| 11 | enabled: true |
| 12 | max-total: 5 |
| 13 | - build-discarder: |
| 14 | days-to-keep: 14 |
| 15 | num-to-keep: 60 |
| 16 | triggers: |
| 17 | - gerrit: |
| 18 | silent: true |
| 19 | server-name: 'review.trustedfirmware.org' |
| 20 | projects: |
| 21 | - branches: |
| 22 | - branch-compare-type: PLAIN |
| 23 | branch-pattern: 'tfa-next' |
| 24 | project-compare-type: PLAIN |
| 25 | project-pattern: 'TF-A/trusted-firmware-a' |
| 26 | trigger-on: |
| 27 | - patchset-created-event: |
| 28 | exclude-drafts: true |
| 29 | exclude-trivial-rebase: true |
| 30 | exclude-no-code-change: true |
| 31 | exclude-private: true |
| 32 | exclude-wip: true |
| 33 | parameters: |
| 34 | # GERRIT_{PROJECT,BRANCH,REFSPEC} are set when triggered by a Gerrit |
| 35 | # patchset - defaults below are for manual triggers |
| 36 | - string: |
| 37 | name: GERRIT_PROJECT |
| 38 | default: 'TF-A/trusted-firmware-a' |
| 39 | - string: |
| 40 | name: GERRIT_BRANCH |
| 41 | default: 'refs/heads/tfa-next' |
| 42 | - string: |
| 43 | name: GERRIT_REFSPEC |
| 44 | default: '+refs/heads/tfa-next:refs/remotes/origin/tfa-next' |
| 45 | description: | |
| 46 | 'e.g. refs/changes/13/31138/1' |
| 47 | - string: |
| 48 | name: TF_GERRIT_REFSPEC |
| 49 | default: ${GERRIT_REFSPEC} |
| 50 | description: | |
| 51 | 'do-not-amend: used by scripts/clone.sh to fetch the correct Gerrit patchset - use GERRIT_REFSPEC instead' |
| 52 | - string: |
| 53 | name: TFTF_GERRIT_PROJECT |
| 54 | default: 'TF-A/tf-a-tests' |
| 55 | - string: |
| 56 | name: TFTF_GERRIT_BRANCH |
| 57 | default: 'refs/heads/master' |
| 58 | - string: |
| 59 | name: TFTF_GERRIT_REFSPEC |
| 60 | default: '+refs/heads/master:refs/remotes/origin/master' |
| 61 | - string: |
| 62 | name: CI_REFSPEC |
| 63 | default: '+refs/heads/tfa-next:refs/remotes/origin/tfa-next' |
| 64 | description: | |
| 65 | 'Refs to fetch for the tf-a-ci-scripts repo' |
| 66 | - string: |
| 67 | name: SHARE_FOLDER |
Zachary Leaf | 65d20a0 | 2024-10-22 09:25:47 +0100 | [diff] [blame^] | 68 | default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}' |
Zachary Leaf | 5a9a277 | 2024-10-15 15:07:23 +0100 | [diff] [blame] | 69 | description: 'Folder containing shared repositories for downstream pipeline jobs' |
| 70 | - string: |
| 71 | name: CLONE_REPOS |
| 72 | default: "tf-a-ci-scripts,trusted-firmware-a" |
| 73 | description: | |
| 74 | 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) |
| 75 | - string: |
| 76 | name: FETCH_SSH |
| 77 | default: 1 |
| 78 | description: | |
| 79 | Fetch branches with authenticated SSH instead of anonymous HTTPS |
| 80 | wrappers: |
| 81 | - credentials-binding: |
| 82 | - ssh-user-private-key: |
| 83 | credential-id: TFA_CI_BOT_USER_SSH_KEY |
| 84 | key-file-variable: CI_BOT_KEY |
| 85 | username-variable: CI_BOT_USERNAME |
| 86 | passphrase-variable: '' |
| 87 | - workspace-cleanup |
| 88 | - timestamps |
| 89 | builders: |
| 90 | - shell: |
| 91 | !include-raw: scripts/clone.sh |
| 92 | - shell: | |
| 93 | #!/bin/bash |
| 94 | set -e |
| 95 | cat << EOF > tf-a-env.param |
| 96 | TF_GERRIT_PROJECT=${GERRIT_PROJECT} |
| 97 | TF_GERRIT_BRANCH=${GERRIT_BRANCH} |
| 98 | TF_GERRIT_REFSPEC=${GERRIT_REFSPEC} |
| 99 | SHARE_FOLDER=${SHARE_FOLDER} |
| 100 | EOF |
| 101 | - multijob: |
| 102 | name: Build Trusted Firmware |
| 103 | condition: COMPLETED |
| 104 | projects: |
| 105 | - name: tf-a-ci-gateway-tfa-next |
| 106 | alias: tf-next-build |
| 107 | current-parameters: true |
| 108 | kill-phase-on: NEVER |
| 109 | predefined-parameters: | |
| 110 | TEST_GROUPS=tf-next-build |
| 111 | property-file: tf-a-env.param |