- job: | |
name: tf-a-static-checks | |
node: docker-amd64-tf-a-jammy | |
project-type: freestyle | |
concurrent: true | |
disabled: false | |
defaults: global | |
description: Run static checks on Git repository | |
properties: | |
- build-discarder: | |
days-to-keep: 14 | |
- authorization: | |
!include: authorization.yaml.inc | |
parameters: | |
- string: | |
name: TF_GERRIT_PROJECT | |
default: 'TF-A/trusted-firmware-a' | |
- string: | |
name: TF_GERRIT_BRANCH | |
default: 'refs/heads/integration' | |
- string: | |
name: TF_GERRIT_REFSPEC | |
default: '+refs/heads/integration:refs/remotes/origin/integration' | |
- string: | |
name: TFTF_GERRIT_PROJECT | |
default: 'TF-A/tf-a-tests' | |
- string: | |
name: TFTF_GERRIT_BRANCH | |
default: 'refs/heads/master' | |
- string: | |
name: TFTF_GERRIT_REFSPEC | |
default: '+refs/heads/master:refs/remotes/origin/master' | |
- string: | |
name: CI_REFSPEC | |
default: '+refs/heads/master:refs/remotes/origin/master' | |
- choice: | |
name: REPO_UNDER_TEST | |
choices: | |
- trusted-firmware-a | |
- tf-a-tests | |
default: trusted-firmware-a | |
description: |- | |
Repository to run static checks on. | |
- string: | |
name: SHARE_FOLDER | |
default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}' | |
description: 'Folder containing shared repositories for downstream pipeline jobs' | |
wrappers: | |
- timestamps | |
- timeout: | |
timeout: 240 | |
fail: true | |
builders: | |
- shell: | |
!include-raw: scripts/clone.sh | |
- shell: | | |
#!/bin/bash | |
set -e | |
if [[ "${REPO_UNDER_TEST}" == trusted-firmware-a ]]; then | |
cat <<EOF > env.param | |
QA_SERVER_PROJECT=${JOB_NAME} | |
QA_SERVER_VERSION=${BUILD_NUMBER} | |
GERRIT_PROJECT=${TF_GERRIT_PROJECT} | |
GERRIT_BRANCH=${TF_GERRIT_BRANCH} | |
GERRIT_REFSPEC=${TF_GERRIT_REFSPEC} | |
TEST_GROUPS=tf-l2-scan-build | |
EOF | |
fi | |
cd ${WORKSPACE}/${REPO_UNDER_TEST} | |
# Executed project-related static checks: copyright presence, headers in alphabetical order, | |
# line endings, coding style and banned API. | |
IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh | |
- trigger-builds: | |
- project: tf-a-ci-gateway | |
block: true | |
property-file: env.param | |
current-parameters: true | |
# Do not trigger tf-a-ci-gateway if env.param file does not exist, | |
# which is the case here for TF-A Tests repository | |
property-file-fail-on-missing: True | |
publishers: | |
- archive: | |
artifacts: '${REPO_UNDER_TEST}/static-checks.log' | |
- groovy-postbuild: | |
script: | |
!include-raw: | |
- tf-a-static-checks/postbuild.groovy |