blob: ad8d0b543abcb369e00be099f6a7e63f8d60741e [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
35 default: '+refs/heads/master:refs/remotes/origin/master'
36 - 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:
45 name: SHARE_FOLDER
46 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
47 description: 'Folder containing shared repositories for downstream pipeline jobs'
48 wrappers:
49 - timestamps
50 - timeout:
51 timeout: 240
52 fail: true
53 builders:
54 - shell:
55 !include-raw: scripts/clone.sh
56 - shell: |
57 #!/bin/bash
58 set -e
59 if [[ "${REPO_UNDER_TEST}" == trusted-firmware-a ]]; then
60 cat <<EOF > env.param
61 QA_SERVER_PROJECT=${JOB_NAME}
62 QA_SERVER_VERSION=${BUILD_NUMBER}
63 GERRIT_PROJECT=${TF_GERRIT_PROJECT}
64 GERRIT_BRANCH=${TF_GERRIT_BRANCH}
65 GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
66 TEST_GROUPS=tf-l2-scan-build
67 EOF
68 fi
69 cd ${WORKSPACE}/${REPO_UNDER_TEST}
70 # Executed project-related static checks: copyright presence, headers in alphabetical order,
71 # line endings, coding style and banned API.
72 IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh
73 - trigger-builds:
74 - project: tf-a-ci-gateway
75 block: true
76 property-file: env.param
77 current-parameters: true
78 # Do not trigger tf-a-ci-gateway if env.param file does not exist,
79 # which is the case here for TF-A Tests repository
80 property-file-fail-on-missing: True
81 publishers:
82 - archive:
83 artifacts: '${REPO_UNDER_TEST}/static-checks.log'
84 - groovy-postbuild:
85 script:
86 !include-raw:
87 - tf-a-static-checks/postbuild.groovy