blob: 31968328d3f6e2eac357c71db49f67906a70797f [file] [log] [blame]
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03001- job:
Paul Sokolovskyc9503ee2023-11-17 22:44:39 +03002 name: tf-a-eclair-delta-separate
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03003 project-type: matrix
4 concurrent: true
Paul Sokolovskyad5638f2024-10-22 12:34:15 +07005 disabled: true
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03006 defaults: global
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07007 description: |
Paul Sokolovskyc9503ee2023-11-17 22:44:39 +03008 ECLAIR (MISRA compliance) testing of TF-A patches (different configs built independently/separately)
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03009 properties:
Chris Kay675db4f2025-06-24 14:14:34 +010010 - build-discarder:
11 days-to-keep: 45
12 num-to-keep: 200
13 artifact-num-to-keep: 80
14 - throttle:
15 option: category
16 categories:
17 - eclair
18 matrix-builds: false
19 matrix-configs: true
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030020 parameters:
Chris Kay675db4f2025-06-24 14:14:34 +010021 - string:
22 name: MAKE_TARGET
23 default: ""
24 description: |
25 TF-A make target
26 - string:
27 name: DEBUG
28 default: "1"
29 description: |
30 TF-A make DEBUG setting
31 - string:
32 name: GERRIT_HOST
33 default: review.trustedfirmware.org
34 - string:
35 name: GERRIT_PROJECT
36 default: TF-A/trusted-firmware-a
37 description: |
38 Git project to build (also set by Gerrit trigger)
39 - string:
40 name: GERRIT_BRANCH
41 default: integration
42 description: |
43 Git branch to build (also set by Gerrit trigger)
44 - string:
45 name: GERRIT_REFSPEC
46 default: ""
47 - string:
48 name: GERRIT_CHANGE_NUMBER
49 default: ""
50 - string:
51 name: GERRIT_PATCHSET_NUMBER
52 default: ""
53 - string:
54 name: MBEDTLS_URL
55 default: https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.4.1.tar.gz
56 description: |
57 URL of mbedTLS library to use in build (only for some configurations)
58 - string:
59 name: SHARE_FOLDER
60 default: /srv/shared/${JOB_NAME}/${BUILD_NUMBER}
61 description: Folder containing shared repositories for downstream pipeline jobs
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030062 axes:
Chris Kay675db4f2025-06-24 14:14:34 +010063 - axis:
64 type: slave
65 name: label
66 values:
67 - docker-tf-a-eclair
68 - axis:
69 type: user-defined
70 name: TF_CONFIG
71 values:
72 - fvp-default
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030073 triggers:
Chris Kay675db4f2025-06-24 14:14:34 +010074 - gerrit:
75 silent: true
76 server-name: review.trustedfirmware.org
77 projects:
78 - branches:
79 - branch-compare-type: PLAIN
80 branch-pattern: integration
81 project-compare-type: PLAIN
82 project-pattern: TF-A/trusted-firmware-a
83 - branches:
84 - branch-compare-type: PLAIN
85 branch-pattern: integration
86 project-compare-type: PLAIN
87 project-pattern: sandbox/pfalcon/trusted-firmware-a
88 trigger-on:
89 - comment-added-event:
90 approval-category: Allow-CI
91 approval-value: 1
92 - comment-added-event:
93 approval-category: Allow-CI
94 approval-value: 2
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030095 wrappers:
Chris Kay675db4f2025-06-24 14:14:34 +010096 - timestamps
97 - timeout:
98 timeout: 150
99 fail: true
100 - credentials-binding:
101 - ssh-user-private-key:
102 credential-id: TFA_CI_BOT_USER_SSH_KEY
103 key-file-variable: CI_BOT_KEY
104 username-variable: CI_BOT_USERNAME
105 passphrase-variable: ""
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +0300106 builders:
Chris Kay675db4f2025-06-24 14:14:34 +0100107 - shell: |
108 #!/bin/bash
109 set -ex
110 pwd
111 env | grep GERRIT
112 git clone https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git
113 git clone https://git.trustedfirmware.org/ci/tf-ci-scripts.git
Paul Sokolovsky5e7cf7f2023-06-30 15:43:34 +0300114
Chris Kay675db4f2025-06-24 14:14:34 +0100115 git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} -b ${GERRIT_BRANCH}
116 if [ -n "${GERRIT_REFSPEC}" ]; then
117 (
118 cd $(basename ${GERRIT_PROJECT})
119 git fetch https://${GERRIT_HOST}/${GERRIT_PROJECT} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
120 )
121 fi
122 (cd trusted-firmware-a; git log --oneline -n5)
Paul Sokolovsky5e7cf7f2023-06-30 15:43:34 +0300123
Chris Kay675db4f2025-06-24 14:14:34 +0100124 export ECLAIR_CONFIG_DIR=$PWD/tf-a-ci-scripts/eclair
125 . tf-ci-scripts/eclair/utils.sh
126 # TODO
127 #. tf-a-ci-scripts/eclair/utils_tfa.sh
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300128
Chris Kay675db4f2025-06-24 14:14:34 +0100129 detachLicense 9000
130 trap "returnLicense || true" EXIT
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300131
Chris Kay675db4f2025-06-24 14:14:34 +0100132 . tf-a-ci-scripts/eclair/analyze_common.sh
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300133
Chris Kay675db4f2025-06-24 14:14:34 +0100134 export ECLAIR_ANALYSIS=ECLAIR
135 eclair_prepare
136 eclair_analyze tf-a-ci-scripts/eclair/build-tfa.sh ${TF_CONFIG}
137 eclair_make_ecd
138 eclair_make_reports
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300139
Chris Kay675db4f2025-06-24 14:14:34 +0100140 echo "========= Building base revision ========="
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300141
Chris Kay675db4f2025-06-24 14:14:34 +0100142 (
143 cd $(basename ${GERRIT_PROJECT})
144 git checkout HEAD^
145 git log --oneline -n5
146 )
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300147
Chris Kay675db4f2025-06-24 14:14:34 +0100148 export ECLAIR_ANALYSIS=ECLAIR_BASE
149 eclair_prepare
150 eclair_analyze tf-a-ci-scripts/eclair/build-tfa.sh ${TF_CONFIG}
151 eclair_make_ecd
152 eclair_make_reports
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300153
Chris Kay675db4f2025-06-24 14:14:34 +0100154 eclair_make_delta_report ECLAIR_BASE ECLAIR
155 tf-ci-scripts/eclair/eclair_diff_report.py diff_output > misra_delta.txt
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300156
Chris Kay675db4f2025-06-24 14:14:34 +0100157 returnLicense
158 tf-ci-scripts/eclair/analyze_delta_index_html.sh
159 tf-ci-scripts/eclair/post_gerrit_comment.sh
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +0300160 publishers:
Chris Kay675db4f2025-06-24 14:14:34 +0100161 - archive:
162 artifacts: ECLAIR*/**, diff_output/**, misra_delta.txt, *issues_html/**, index.html
163 excludes: ECLAIR/out/.data/**
164 latest-only: false
165 allow-empty: true