blob: 77ff150005ba344758b7b59cba958c745179e7af [file] [log] [blame]
Paul Sokolovsky15bca2a2024-06-18 21:49:36 +03001- job:
2 name: pfalcon-tf-a-static-checks
3 node: docker-amd64-tf-a-jammy
4 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
8 description: Run static checks on Git repository
9 properties:
10 - build-discarder:
11 days-to-keep: 14
12 - authorization:
13 !include: authorization.yaml.inc
14 parameters:
15 - string:
16 name: TF_GERRIT_PROJECT
17 default: 'TF-A/trusted-firmware-a'
18 - string:
19 name: TF_GERRIT_BRANCH
20 default: 'refs/heads/integration'
21 - string:
22 name: TF_GERRIT_REFSPEC
23 default: '+refs/heads/integration:refs/remotes/origin/integration'
24 - string:
25 name: TFTF_GERRIT_PROJECT
26 default: 'TF-A/tf-a-tests'
27 - string:
28 name: TFTF_GERRIT_BRANCH
29 default: 'refs/heads/master'
30 - string:
31 name: TFTF_GERRIT_REFSPEC
32 default: '+refs/heads/master:refs/remotes/origin/master'
33 - string:
34 name: CI_REFSPEC
Paul Sokolovsky6a28b0a2024-06-18 21:58:36 +030035 default: 'pfalcon'
Paul Sokolovsky15bca2a2024-06-18 21:49:36 +030036 - choice:
37 name: REPO_UNDER_TEST
38 choices:
39 - trusted-firmware-a
40 - tf-a-tests
41 default: trusted-firmware-a
42 description: |-
43 Repository to run static checks on.
44 - string:
Paul Sokolovskyabc271e2024-06-27 13:02:00 +030045 name: GERRIT_BRANCH
46 default: ''
47 - string:
Paul Sokolovsky15bca2a2024-06-18 21:49:36 +030048 name: SHARE_FOLDER
Chris Kay4bbc9692025-06-13 15:24:41 +010049 default: '/srv/shared/staging/${JOB_NAME}/${BUILD_NUMBER}'
Paul Sokolovsky15bca2a2024-06-18 21:49:36 +030050 description: 'Folder containing shared repositories for downstream pipeline jobs'
51 wrappers:
52 - timestamps
53 - timeout:
54 timeout: 240
55 fail: true
56 builders:
57 - shell:
Paul Sokolovsky6a28b0a2024-06-18 21:58:36 +030058 !include-raw: pfalcon-scripts/clone.sh
Paul Sokolovsky15bca2a2024-06-18 21:49:36 +030059 - shell: |
60 #!/bin/bash
61 set -e
62 if [[ "${REPO_UNDER_TEST}" == trusted-firmware-a ]]; then
63 cat <<EOF > env.param
64 QA_SERVER_PROJECT=${JOB_NAME}
65 QA_SERVER_VERSION=${BUILD_NUMBER}
66 GERRIT_PROJECT=${TF_GERRIT_PROJECT}
67 GERRIT_BRANCH=${TF_GERRIT_BRANCH}
68 GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
69 TEST_GROUPS=tf-l2-scan-build
70 EOF
71 fi
72 cd ${WORKSPACE}/${REPO_UNDER_TEST}
73 # Executed project-related static checks: copyright presence, headers in alphabetical order,
74 # line endings, coding style and banned API.
75 IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh
76 - trigger-builds:
77 - project: tf-a-ci-gateway
78 block: true
79 property-file: env.param
80 current-parameters: true
81 # Do not trigger tf-a-ci-gateway if env.param file does not exist,
82 # which is the case here for TF-A Tests repository
83 property-file-fail-on-missing: True
84 publishers:
85 - archive:
86 artifacts: '${REPO_UNDER_TEST}/static-checks.log'
87 - groovy-postbuild:
88 script:
89 !include-raw:
90 - tf-a-static-checks/postbuild.groovy