summaryrefslogtreecommitdiff
path: root/tf-static-checks.yaml
blob: 1f39b24932804c9b3fc2c4ea6dea07193bb177d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
- scm:
    name: tf-a-ci-scripts
    scm:
        - git:
            url: https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git
            refspec: +refs/heads/master:refs/remotes/origin/master
            name: origin
            branches:
                - refs/heads/master
            basedir: tf-a-ci-scripts
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
- scm:
    name: trusted-firmware-a
    scm:
        - git:
            url: https://review.trustedfirmware.org/${TF_GERRIT_PROJECT}
            refspec: ${TF_GERRIT_REFSPEC}
            name: origin
            branches:
                - ${TF_GERRIT_BRANCH}
            basedir: trusted-firmware-a
            skip-tag: true
            shallow-clone: false
            wipe-workspace: false
- job:
    name: tf-static-checks
    node: docker-amd64-tf-a-bionic
    project-type: freestyle
    concurrent: true
    disabled: false
    defaults: global
    description: Run static checks on Git repository
    properties:
        - build-discarder:
            days-to-keep: 7
        - 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'
    scm:
        - tf-a-ci-scripts
        - trusted-firmware-a
    wrappers:
        - timestamps
        - timeout:
            timeout: 180
            fail: true
    builders:
    - shell: |
       #!/bin/bash
       set -e
       cat > env.param << EOF
       GERRIT_PROJECT=${TF_GERRIT_PROJECT}
       GERRIT_BRANCH=${TF_GERRIT_BRANCH}
       GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
       QA_SERVER_PROJECT=${JOB_NAME}
       QA_SERVER_VERSION=${BUILD_NUMBER}
       EOF
       cd ${WORKSPACE}/trusted-firmware-a
       # 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-ci-gateway
        block: true
        # Execute Clang static analyzer (scan-build)
        predefined-parameters: TEST_GROUPS=tf-l2-scan-build
        property-file: env.param
    publishers:
        - archive:
            artifacts: 'trusted-firmware-a/static-checks.log'
        - groovy-postbuild:
            script:
                !include-raw:
                  - tf-static-checks/postbuild.groovy