blob: c785f1067784cea8263ed494782e01d347c27715 [file] [log] [blame]
Paul Sokolovsky63498522023-11-17 22:47:59 +03001- job:
2 name: tf-a-eclair-delta
Paul Sokolovskyd3f0b002024-01-08 23:49:00 +03003 node: docker-tf-a-eclair-3.13
Paul Sokolovsky63498522023-11-17 22:47:59 +03004 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07008 description: |
Paul Sokolovsky63498522023-11-17 22:47:59 +03009 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 Sokolovsky63498522023-11-17 22:47:59 +030015 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 Wehrmeistercec409a2025-04-03 14:34:02 -050062 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.3.tar.gz'
Paul Sokolovsky63498522023-11-17 22:47:59 +030063 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 Babufd524222025-01-21 23:42:41 +000076 branch-pattern: openci-migration
Paul Sokolovsky63498522023-11-17 22:47:59 +030077 project-compare-type: PLAIN
Saheer Babufd524222025-01-21 23:42:41 +000078 project-pattern: 'next/TF-A/trusted-firmware-a'
Paul Sokolovsky63498522023-11-17 22:47:59 +030079 - 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 Sokolovsky3a16e522024-11-29 14:52:50 +070094 timeout: 330
Paul Sokolovsky63498522023-11-17 22:47:59 +030095 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 Sokolovsky97648082024-08-22 21:13:54 +0300106 export PATH=~/.local/bin:$PATH
Paul Sokolovsky63498522023-11-17 22:47:59 +0300107 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