ci: format all YAML with `yq`
`yq` is the YAML query tool, used for manipulating YAML files. This
change uses the following command to read in and to pretty-print every
YAML file in this repository:
for x in $(find . -name '*.yaml'); do
yq -i -P -oy $x
done
This makes it a bit easier to automate synchronisation between staging
and upstream, as yq always pretty-prints the entire document when
manipulating files.
Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: If973766fa26500d5320612422d1b4999b23439d3
diff --git a/tf-a-eclair-delta-separate.yaml b/tf-a-eclair-delta-separate.yaml
index 9cd2816..3196832 100644
--- a/tf-a-eclair-delta-separate.yaml
+++ b/tf-a-eclair-delta-separate.yaml
@@ -7,158 +7,159 @@
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
+ - 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'
+ - 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
+ - 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: integration
- project-compare-type: PLAIN
- project-pattern: '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
+ - gerrit:
+ silent: true
+ server-name: review.trustedfirmware.org
+ projects:
+ - branches:
+ - branch-compare-type: PLAIN
+ branch-pattern: integration
+ project-compare-type: PLAIN
+ project-pattern: 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: ''
+ - 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
+ - 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)
+ 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
+ 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
+ detachLicense 9000
+ trap "returnLicense || true" EXIT
- . tf-a-ci-scripts/eclair/analyze_common.sh
+ . 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
+ 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 ========="
+ echo "========= Building base revision ========="
- (
- cd $(basename ${GERRIT_PROJECT})
- git checkout HEAD^
- git log --oneline -n5
- )
+ (
+ 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
+ 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
+ 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
+ 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
+ - archive:
+ artifacts: ECLAIR*/**, diff_output/**, misra_delta.txt, *issues_html/**, index.html
+ excludes: ECLAIR/out/.data/**
+ latest-only: false
+ allow-empty: true