- job: | |
name: tf-a-eclair-delta-separate | |
project-type: matrix | |
concurrent: true | |
disabled: true | |
defaults: global | |
description: | | |
ECLAIR (MISRA compliance) testing of TF-A patches (different configs built independently/separately) | |
properties: | |
- build-discarder: | |
days-to-keep: 45 | |
num-to-keep: 200 | |
artifact-num-to-keep: 80 | |
- throttle: | |
option: category | |
categories: [eclair] | |
matrix-builds: false | |
matrix-configs: true | |
parameters: | |
- string: | |
name: MAKE_TARGET | |
default: '' | |
description: | | |
TF-A make target | |
- string: | |
name: DEBUG | |
default: '1' | |
description: | | |
TF-A make DEBUG setting | |
- string: | |
name: GERRIT_HOST | |
default: 'review.trustedfirmware.org' | |
- string: | |
name: GERRIT_PROJECT | |
default: 'TF-A/trusted-firmware-a' | |
description: | | |
Git project to build (also set by Gerrit trigger) | |
- string: | |
name: GERRIT_BRANCH | |
default: 'integration' | |
description: | | |
Git branch to build (also set by Gerrit trigger) | |
- string: | |
name: GERRIT_REFSPEC | |
default: '' | |
- string: | |
name: GERRIT_CHANGE_NUMBER | |
default: '' | |
- string: | |
name: GERRIT_PATCHSET_NUMBER | |
default: '' | |
- string: | |
name: MBEDTLS_URL | |
default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.4.1.tar.gz' | |
description: | | |
URL of mbedTLS library to use in build (only for some configurations) | |
- string: | |
name: SHARE_FOLDER | |
default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}' | |
description: 'Folder containing shared repositories for downstream pipeline jobs' | |
axes: | |
- axis: | |
type: slave | |
name: label | |
values: | |
- docker-tf-a-eclair | |
- axis: | |
type: user-defined | |
name: TF_CONFIG | |
values: | |
- fvp-default | |
triggers: | |
- gerrit: | |
silent: true | |
server-name: 'review.trustedfirmware.org' | |
projects: | |
- branches: | |
- branch-compare-type: PLAIN | |
branch-pattern: openci-migration | |
project-compare-type: PLAIN | |
project-pattern: 'next/TF-A/trusted-firmware-a' | |
- branches: | |
- branch-compare-type: PLAIN | |
branch-pattern: integration | |
project-compare-type: PLAIN | |
project-pattern: 'sandbox/pfalcon/trusted-firmware-a' | |
trigger-on: | |
- comment-added-event: | |
approval-category: "Allow-CI" | |
approval-value: 1 | |
- comment-added-event: | |
approval-category: "Allow-CI" | |
approval-value: 2 | |
wrappers: | |
- timestamps | |
- timeout: | |
timeout: 150 | |
fail: true | |
- credentials-binding: | |
- ssh-user-private-key: | |
credential-id: TFA_CI_BOT_USER_SSH_KEY | |
key-file-variable: CI_BOT_KEY | |
username-variable: CI_BOT_USERNAME | |
passphrase-variable: '' | |
builders: | |
- shell: | | |
#!/bin/bash | |
set -ex | |
pwd | |
env | grep GERRIT | |
git clone https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git | |
git clone https://git.trustedfirmware.org/ci/tf-ci-scripts.git | |
git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} -b ${GERRIT_BRANCH} | |
if [ -n "${GERRIT_REFSPEC}" ]; then | |
( | |
cd $(basename ${GERRIT_PROJECT}) | |
git fetch https://${GERRIT_HOST}/${GERRIT_PROJECT} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD | |
) | |
fi | |
(cd trusted-firmware-a; git log --oneline -n5) | |
export ECLAIR_CONFIG_DIR=$PWD/tf-a-ci-scripts/eclair | |
. tf-ci-scripts/eclair/utils.sh | |
# TODO | |
#. tf-a-ci-scripts/eclair/utils_tfa.sh | |
detachLicense 9000 | |
trap "returnLicense || true" EXIT | |
. tf-a-ci-scripts/eclair/analyze_common.sh | |
export ECLAIR_ANALYSIS=ECLAIR | |
eclair_prepare | |
eclair_analyze tf-a-ci-scripts/eclair/build-tfa.sh ${TF_CONFIG} | |
eclair_make_ecd | |
eclair_make_reports | |
echo "========= Building base revision =========" | |
( | |
cd $(basename ${GERRIT_PROJECT}) | |
git checkout HEAD^ | |
git log --oneline -n5 | |
) | |
export ECLAIR_ANALYSIS=ECLAIR_BASE | |
eclair_prepare | |
eclair_analyze tf-a-ci-scripts/eclair/build-tfa.sh ${TF_CONFIG} | |
eclair_make_ecd | |
eclair_make_reports | |
eclair_make_delta_report ECLAIR_BASE ECLAIR | |
tf-ci-scripts/eclair/eclair_diff_report.py diff_output > misra_delta.txt | |
returnLicense | |
tf-ci-scripts/eclair/analyze_delta_index_html.sh | |
tf-ci-scripts/eclair/post_gerrit_comment.sh | |
publishers: | |
- archive: | |
artifacts: 'ECLAIR*/**, diff_output/**, misra_delta.txt, *issues_html/**, index.html' | |
excludes: 'ECLAIR/out/.data/**' | |
latest-only: false | |
allow-empty: true |