Fix nexus-iq-scan-patterns should be obj class
[releng/global-jjb.git] / jjb / lf-c-cpp-jobs.yaml
1 ---
2 ################
3 # CMAKE VERIFY #
4 ################
5
6 - lf_cmake_verify: &lf_cmake_verify
7     name: lf-cmake-verify
8
9     ######################
10     # Default parameters #
11     ######################
12
13     branch: master
14     build-days-to-keep: 7
15     build-dir: '$WORKSPACE/target'
16     build-timeout: 15
17     cmake-opts: ''
18     git-url: '$GIT_URL/$PROJECT'
19     github-url: 'https://github.com'
20     install-prefix: '$BUILD_DIR/output'
21     make-opts: ''
22     pre-build: ''
23     stream: master
24     submodule-recursive: true
25
26     gerrit_verify_triggers:
27       - patchset-created-event:
28           exclude-drafts: true
29           exclude-trivial-rebase: false
30           exclude-no-code-change: false
31       - draft-published-event
32       - comment-added-contains-event:
33           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
34
35     gerrit_trigger_file_paths:
36       - compare-type: REG_EXP
37         pattern: '.*'
38
39     # github_included_regions MUST match gerrit_trigger_file_paths
40     github_included_regions:
41       - '.*'
42
43     #####################
44     # Job Configuration #
45     #####################
46
47     project-type: freestyle
48     node: '{build-node}'
49
50     properties:
51       - lf-infra-properties:
52           build-days-to-keep: '{build-days-to-keep}'
53
54     parameters:
55       - lf-infra-parameters:
56           project: '{project}'
57           branch: '{branch}'
58           stream: '{stream}'
59           lftools-version: '{lftools-version}'
60       - lf-cmake-parameters:
61           build-dir: '{build-dir}'
62           cmake-opts: '{cmake-opts}'
63           install-prefix: '{install-prefix}'
64           make-opts: '{make-opts}'
65
66     wrappers:
67       - lf-infra-wrappers:
68           build-timeout: '{build-timeout}'
69           jenkins-ssh-credential: '{jenkins-ssh-credential}'
70
71     builders:
72       - shell: '{pre-build}'
73       - shell: !include-raw-escape: ../shell/cmake-build.sh
74
75     publishers:
76       - lf-infra-publish
77
78 - job-template:
79     name: '{project-name}-cmake-verify-{stream}'
80     id: gerrit-cmake-verify
81     concurrent: true
82     <<: *lf_cmake_verify
83
84     scm:
85       - lf-infra-gerrit-scm:
86           branch: '$GERRIT_BRANCH'
87           jenkins-ssh-credential: '{jenkins-ssh-credential}'
88           git-url: '{git-url}'
89           refspec: '$GERRIT_REFSPEC'
90           submodule-recursive: '{submodule-recursive}'
91           choosing-strategy: gerrit
92
93     triggers:
94       - gerrit:
95           server-name: '{gerrit-server-name}'
96           trigger-on: '{obj:gerrit_verify_triggers}'
97           projects:
98             - project-compare-type: 'ANT'
99               project-pattern: '{project}'
100               branches:
101                 - branch-compare-type: 'ANT'
102                   branch-pattern: '**/{branch}'
103               file-paths: '{obj:gerrit_trigger_file_paths}'
104
105 - job-template:
106     name: '{project-name}-cmake-verify-{stream}'
107     id: github-cmake-verify
108     concurrent: true
109     <<: *lf_cmake_verify
110
111     properties:
112       - lf-infra-properties:
113           build-days-to-keep: '{build-days-to-keep}'
114       - github:
115           url: '{github-url}/{github-org}/{project}'
116
117     scm:
118       - lf-infra-github-scm:
119           url: '{git-clone-url}{github-org}/{project}'
120           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
121           branch: '$sha1'
122           submodule-recursive: '{submodule-recursive}'
123           choosing-strategy: default
124           jenkins-ssh-credential: '{jenkins-ssh-credential}'
125
126     triggers:
127       - github-pull-request:
128           trigger-phrase: '^(recheck|reverify)$'
129           only-trigger-phrase: false
130           status-context: 'CMake Verify'
131           permit-all: true
132           github-hooks: true
133           included-regions: '{obj:github_included_regions}'
134           white-list-target-branches:
135             - '{branch}'