blob: 1f39b24932804c9b3fc2c4ea6dea07193bb177d1 [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
24 skip-tag: true
25 shallow-clone: false
26 wipe-workspace: false
Leonardo Sandoval46226da2021-01-15 13:55:56 -060027- job:
28 name: tf-static-checks
29 node: docker-amd64-tf-a-bionic
30 project-type: freestyle
31 concurrent: true
32 disabled: false
33 defaults: global
34 description: Run static checks on Git repository
35 properties:
36 - build-discarder:
37 days-to-keep: 7
38 - authorization:
Leonardo Sandovalebca8822021-01-25 18:20:04 -060039 !include: authorization.yaml.inc
Leonardo Sandoval46226da2021-01-15 13:55:56 -060040 parameters:
41 - string:
42 name: TF_GERRIT_PROJECT
43 default: 'TF-A/trusted-firmware-a'
44 - string:
45 name: TF_GERRIT_BRANCH
Leonardo Sandoval3da340d2021-02-09 14:53:30 -060046 default: 'refs/heads/integration'
Leonardo Sandoval46226da2021-01-15 13:55:56 -060047 - string:
48 name: TF_GERRIT_REFSPEC
Leonardo Sandoval3da340d2021-02-09 14:53:30 -060049 default: '+refs/heads/integration:refs/remotes/origin/integration'
Leonardo Sandoval46226da2021-01-15 13:55:56 -060050 scm:
51 - tf-a-ci-scripts
52 - trusted-firmware-a
53 wrappers:
54 - timestamps
55 - timeout:
56 timeout: 180
57 fail: true
58 builders:
59 - shell: |
60 #!/bin/bash
61 set -e
Leonardo Sandoval46226da2021-01-15 13:55:56 -060062 cat > env.param << EOF
63 GERRIT_PROJECT=${TF_GERRIT_PROJECT}
64 GERRIT_BRANCH=${TF_GERRIT_BRANCH}
65 GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
66 QA_SERVER_PROJECT=${JOB_NAME}
67 QA_SERVER_VERSION=${BUILD_NUMBER}
68 EOF
Leonardo Sandoval46226da2021-01-15 13:55:56 -060069 cd ${WORKSPACE}/trusted-firmware-a
Leonardo Sandoval46226da2021-01-15 13:55:56 -060070 # 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
Leonardo Sandoval46226da2021-01-15 13:55:56 -060073 - trigger-builds:
74 - project: tf-ci-gateway
Leonardo Sandoval9f11c922021-02-16 09:13:53 -060075 block: true
Leonardo Sandoval46226da2021-01-15 13:55:56 -060076 # Execute Clang static analyzer (scan-build)
77 predefined-parameters: TEST_GROUPS=tf-l2-scan-build
78 property-file: env.param
Leonardo Sandoval46226da2021-01-15 13:55:56 -060079 publishers:
80 - archive:
81 artifacts: 'trusted-firmware-a/static-checks.log'
82 - groovy-postbuild:
83 script:
84 !include-raw:
85 - tf-static-checks/postbuild.groovy