Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 1 | - job: |
| 2 | name: tf-a-eclair-delta |
Paul Sokolovsky | d3f0b00 | 2024-01-08 23:49:00 +0300 | [diff] [blame] | 3 | node: docker-tf-a-eclair-3.13 |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 4 | project-type: freestyle |
| 5 | concurrent: true |
| 6 | disabled: false |
| 7 | defaults: global |
Paul Sokolovsky | d9f65b5 | 2024-10-22 13:50:58 +0700 | [diff] [blame] | 8 | description: | |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 9 | ECLAIR (MISRA compliance) testing of TF-A patches |
| 10 | properties: |
| 11 | - build-discarder: |
| 12 | days-to-keep: 45 |
| 13 | num-to-keep: 200 |
| 14 | artifact-num-to-keep: 80 |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 15 | parameters: |
| 16 | - string: |
| 17 | name: TF_CONFIG_LIST |
| 18 | default: > |
| 19 | fvp-tbb-mbedtls-rme-romlib |
| 20 | fvp-spm-spmd-lsp |
| 21 | fvp-pauth-bti-sdei |
| 22 | fvp-aarch32-roxlattables |
| 23 | - string: |
| 24 | name: MAKE_TARGET |
| 25 | default: '' |
| 26 | description: | |
| 27 | TF-A make target |
| 28 | - string: |
| 29 | name: MAKE_JOBS |
| 30 | default: '16' |
| 31 | description: | |
| 32 | --jobs to pass to make, etc. |
| 33 | - string: |
| 34 | name: DEBUG |
| 35 | default: '1' |
| 36 | description: | |
| 37 | TF-A make DEBUG setting |
| 38 | - string: |
| 39 | name: GERRIT_HOST |
| 40 | default: 'review.trustedfirmware.org' |
| 41 | - string: |
| 42 | name: GERRIT_PROJECT |
| 43 | default: 'TF-A/trusted-firmware-a' |
| 44 | description: | |
| 45 | Git project to build (also set by Gerrit trigger) |
| 46 | - string: |
| 47 | name: GERRIT_BRANCH |
| 48 | default: 'integration' |
| 49 | description: | |
| 50 | Git branch to build (also set by Gerrit trigger) |
| 51 | - string: |
| 52 | name: GERRIT_REFSPEC |
| 53 | default: '' |
| 54 | - string: |
| 55 | name: GERRIT_CHANGE_NUMBER |
| 56 | default: '' |
| 57 | - string: |
| 58 | name: GERRIT_PATCHSET_NUMBER |
| 59 | default: '' |
| 60 | - string: |
| 61 | name: MBEDTLS_URL |
Lauren Wehrmeister | cec409a | 2025-04-03 14:34:02 -0500 | [diff] [blame] | 62 | default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.3.tar.gz' |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 63 | description: | |
| 64 | URL of mbedTLS library to use in build (only for some configurations) |
| 65 | - string: |
| 66 | name: SHARE_FOLDER |
| 67 | default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}' |
| 68 | description: 'Folder containing shared repositories for downstream pipeline jobs' |
| 69 | triggers: |
| 70 | - gerrit: |
| 71 | silent: true |
| 72 | server-name: 'review.trustedfirmware.org' |
| 73 | projects: |
| 74 | - branches: |
| 75 | - branch-compare-type: PLAIN |
Saheer Babu | fd52422 | 2025-01-21 23:42:41 +0000 | [diff] [blame] | 76 | branch-pattern: openci-migration |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 77 | project-compare-type: PLAIN |
Saheer Babu | fd52422 | 2025-01-21 23:42:41 +0000 | [diff] [blame] | 78 | project-pattern: 'next/TF-A/trusted-firmware-a' |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 79 | - branches: |
| 80 | - branch-compare-type: PLAIN |
| 81 | branch-pattern: integration |
| 82 | project-compare-type: PLAIN |
| 83 | project-pattern: 'sandbox/pfalcon/trusted-firmware-a' |
| 84 | trigger-on: |
| 85 | - comment-added-event: |
| 86 | approval-category: "Allow-CI" |
| 87 | approval-value: 1 |
| 88 | - comment-added-event: |
| 89 | approval-category: "Allow-CI" |
| 90 | approval-value: 2 |
| 91 | wrappers: |
| 92 | - timestamps |
| 93 | - timeout: |
Paul Sokolovsky | 3a16e52 | 2024-11-29 14:52:50 +0700 | [diff] [blame] | 94 | timeout: 330 |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 95 | fail: true |
| 96 | - credentials-binding: |
| 97 | - ssh-user-private-key: |
| 98 | credential-id: TFA_CI_BOT_USER_SSH_KEY |
| 99 | key-file-variable: CI_BOT_KEY |
| 100 | username-variable: CI_BOT_USERNAME |
| 101 | passphrase-variable: '' |
| 102 | builders: |
| 103 | - shell: | |
| 104 | #!/bin/bash |
| 105 | set -ex |
Paul Sokolovsky | 9764808 | 2024-08-22 21:13:54 +0300 | [diff] [blame] | 106 | export PATH=~/.local/bin:$PATH |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 107 | pwd |
| 108 | env | grep GERRIT |
| 109 | git clone https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git |
| 110 | git clone https://git.trustedfirmware.org/ci/tf-ci-scripts.git |
| 111 | |
| 112 | git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} -b ${GERRIT_BRANCH} |
| 113 | if [ -n "${GERRIT_REFSPEC}" ]; then |
| 114 | ( |
| 115 | cd $(basename ${GERRIT_PROJECT}) |
| 116 | git fetch https://${GERRIT_HOST}/${GERRIT_PROJECT} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD |
| 117 | ) |
| 118 | fi |
| 119 | (cd trusted-firmware-a; git log --oneline -n5) |
| 120 | |
| 121 | export ECLAIR_CONFIG_DIR=$PWD/tf-a-ci-scripts/eclair |
| 122 | . tf-ci-scripts/eclair/utils.sh |
| 123 | # TODO |
| 124 | #. tf-a-ci-scripts/eclair/utils_tfa.sh |
| 125 | |
| 126 | . tf-a-ci-scripts/eclair/eclair_vars.sh |
| 127 | |
| 128 | detachLicense 600 |
| 129 | trap "returnLicense || true" EXIT |
| 130 | |
| 131 | export ECLAIR_ANALYSIS=ECLAIR |
| 132 | eclair_prepare |
| 133 | eclair_analyze tf-a-ci-scripts/eclair/build-tfa-multiple.sh |
| 134 | eclair_make_ecd |
| 135 | eclair_make_reports |
| 136 | |
| 137 | echo "========= Building base revision =========" |
| 138 | |
| 139 | ( |
| 140 | cd $(basename ${GERRIT_PROJECT}) |
| 141 | git checkout HEAD^ |
| 142 | git log --oneline -n5 |
| 143 | ) |
| 144 | |
| 145 | export ECLAIR_ANALYSIS=ECLAIR_BASE |
| 146 | eclair_prepare |
| 147 | eclair_analyze tf-a-ci-scripts/eclair/build-tfa-multiple.sh |
| 148 | eclair_make_ecd |
| 149 | eclair_make_reports |
| 150 | |
| 151 | eclair_make_delta_report ECLAIR_BASE ECLAIR |
| 152 | tf-ci-scripts/eclair/eclair_diff_report.py diff_output > misra_delta.txt |
| 153 | |
| 154 | returnLicense |
| 155 | tf-ci-scripts/eclair/analyze_delta_index_html.sh |
| 156 | tf-ci-scripts/eclair/post_gerrit_comment.sh |
| 157 | publishers: |
| 158 | - archive: |
| 159 | artifacts: 'ECLAIR*/**, diff_output/**, misra_delta.txt, *issues_html/**, index.html' |
| 160 | excludes: 'ECLAIR/out/.data/**' |
| 161 | latest-only: false |
| 162 | allow-empty: true |