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