blob: 81ab262c64bc4e4a3f1c56a8a67baa2c1a95f9a1 [file] [log] [blame]
Leonardo Sandoval46226da2021-01-15 13:55:56 -06001- scm:
2 name: tf-a-ci-scripts
3 scm:
4 - git:
5 url: https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git
6 refspec: +refs/heads/master:refs/remotes/origin/master
7 name: origin
8 branches:
9 - refs/heads/master
10 basedir: tf-a-ci-scripts
11 skip-tag: true
12 shallow-clone: true
13 wipe-workspace: false
14- scm:
15 name: trusted-firmware-a
16 scm:
17 - git:
18 url: https://review.trustedfirmware.org/${TF_GERRIT_PROJECT}
19 refspec: ${TF_GERRIT_REFSPEC}
20 name: origin
21 branches:
22 - ${TF_GERRIT_BRANCH}
23 basedir: trusted-firmware-a
Leonardo Sandoval94abc042021-03-29 19:32:39 -060024 choosing-strategy: gerrit
Leonardo Sandoval46226da2021-01-15 13:55:56 -060025 skip-tag: true
26 shallow-clone: false
27 wipe-workspace: false
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -060028- scm:
29 name: tf-a-tests
30 scm:
31 - git:
32 url: https://review.trustedfirmware.org/${TFTF_GERRIT_PROJECT}
33 refspec: ${TFTF_GERRIT_REFSPEC}
34 name: origin
35 branches:
36 - ${TFTF_GERRIT_BRANCH}
37 basedir: tf-a-tests
Leonardo Sandoval94abc042021-03-29 19:32:39 -060038 choosing-strategy: gerrit
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -060039 skip-tag: true
40 shallow-clone: false
41 wipe-workspace: false
Leonardo Sandoval46226da2021-01-15 13:55:56 -060042- job:
43 name: tf-static-checks
44 node: docker-amd64-tf-a-bionic
45 project-type: freestyle
46 concurrent: true
47 disabled: false
48 defaults: global
49 description: Run static checks on Git repository
50 properties:
51 - build-discarder:
Leonardo Sandovala4feb552021-03-02 12:10:21 -060052 days-to-keep: 14
Leonardo Sandoval46226da2021-01-15 13:55:56 -060053 - authorization:
Leonardo Sandovalebca8822021-01-25 18:20:04 -060054 !include: authorization.yaml.inc
Leonardo Sandoval46226da2021-01-15 13:55:56 -060055 parameters:
56 - string:
57 name: TF_GERRIT_PROJECT
58 default: 'TF-A/trusted-firmware-a'
59 - string:
60 name: TF_GERRIT_BRANCH
Leonardo Sandoval3da340d2021-02-09 14:53:30 -060061 default: 'refs/heads/integration'
Leonardo Sandoval46226da2021-01-15 13:55:56 -060062 - string:
63 name: TF_GERRIT_REFSPEC
Leonardo Sandoval3da340d2021-02-09 14:53:30 -060064 default: '+refs/heads/integration:refs/remotes/origin/integration'
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -060065 - string:
66 name: TFTF_GERRIT_PROJECT
67 default: 'TF-A/tf-a-tests'
68 - string:
69 name: TFTF_GERRIT_BRANCH
70 default: 'refs/heads/master'
71 - string:
72 name: TFTF_GERRIT_REFSPEC
73 default: '+refs/heads/master:refs/remotes/origin/master'
74 - choice:
75 name: REPO_UNDER_TEST
76 choices:
77 - trusted-firmware-a
78 - tf-a-tests
79 default: trusted-firmware-a
80 description: |-
81 Repository to run static checks on.
Leonardo Sandoval46226da2021-01-15 13:55:56 -060082 scm:
83 - tf-a-ci-scripts
84 - trusted-firmware-a
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -060085 - tf-a-tests
Leonardo Sandoval46226da2021-01-15 13:55:56 -060086 wrappers:
87 - timestamps
88 - timeout:
89 timeout: 180
90 fail: true
91 builders:
92 - shell: |
93 #!/bin/bash
94 set -e
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -060095 if [[ "${REPO_UNDER_TEST}" == trusted-firmware-a ]]; then
96 cat <<EOF > env.param
97 QA_SERVER_PROJECT=${JOB_NAME}
98 QA_SERVER_VERSION=${BUILD_NUMBER}
Leonardo Sandoval46226da2021-01-15 13:55:56 -060099 GERRIT_PROJECT=${TF_GERRIT_PROJECT}
100 GERRIT_BRANCH=${TF_GERRIT_BRANCH}
101 GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -0600102 TEST_GROUPS=tf-l2-scan-build
Leonardo Sandoval46226da2021-01-15 13:55:56 -0600103 EOF
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -0600104 fi
105 cd ${WORKSPACE}/${REPO_UNDER_TEST}
Leonardo Sandoval46226da2021-01-15 13:55:56 -0600106 # Executed project-related static checks: copyright presence, headers in alphabetical order,
107 # line endings, coding style and banned API.
108 IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh
Leonardo Sandoval46226da2021-01-15 13:55:56 -0600109 - trigger-builds:
110 - project: tf-ci-gateway
Leonardo Sandoval9f11c922021-02-16 09:13:53 -0600111 block: true
Leonardo Sandoval46226da2021-01-15 13:55:56 -0600112 property-file: env.param
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -0600113 # Do not trigger tf-ci-gateway if env.param file does not exist,
114 # which is the case here for TF-A Tests repository
115 property-file-fail-on-missing: True
Leonardo Sandoval46226da2021-01-15 13:55:56 -0600116 publishers:
117 - archive:
Leonardo Sandovalecbc6f42021-03-19 10:36:24 -0600118 artifacts: '${REPO_UNDER_TEST}/static-checks.log'
Leonardo Sandoval46226da2021-01-15 13:55:56 -0600119 - groovy-postbuild:
120 script:
121 !include-raw:
122 - tf-static-checks/postbuild.groovy