Fix icn-daaas trigger paths
[ci-management.git] / jjb / akraino-templates / akraino-icn-templates.yaml
1 ---
2 #
3 # Copyright (c) 2019 Intel Corporation. All rights reserved.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License.
7 #
8 # You may obtain a copy of the License at
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17
18 - daaas_job_boiler_plate: &daaas_job_boiler_plate
19     name: daaas_job_boiler_plate
20     archive-artifacts: >
21       **/*.log
22     build-days-to-keep: 30
23     build-timeout: 60
24     stream: master
25     project-type: freestyle
26     submodule-recursive: true
27     concurrent: true
28     node: "{build-node}"
29
30     properties:
31       - lf-infra-properties:
32           build-days-to-keep: "{build-days-to-keep}"
33
34     parameters:
35       - lf-infra-parameters:
36           project: "{project}"
37           stream: "{stream}"
38           branch: "{branch}"
39           lftools-version: "{lftools-version}"
40
41       - string:
42           name: ARCHIVE_ARTIFACTS
43           default: "{archive-artifacts}"
44           description: Artifacts to archive to the logs server.
45
46     wrappers:
47       - lf-infra-wrappers:
48           build-timeout: "{build-timeout}"
49           jenkins-ssh-credential: "{jenkins-ssh-credential}"
50
51     scm:
52       - lf-infra-gerrit-scm:
53           jenkins-ssh-credential: "{jenkins-ssh-credential}"
54           git-url: "{git-url}/{project}.git"
55           refspec: "$GERRIT_REFSPEC"
56           branch: "$GERRIT_BRANCH"
57           submodule-recursive: "{submodule-recursive}"
58           submodule-timeout: "{submodule-timeout}"
59           submodule-disable: false
60           choosing-strategy: "gerrit"
61
62     builders:
63       - shell: "{obj:script}"
64
65     publishers:
66       - lf-infra-publish
67
68 #################
69 # JOB TEMPLATES #
70 #################
71 - job-template:
72     # Job template for verify jobs
73
74     name: "{project-name}-{stream}-{type}-verify"
75     <<: *daaas_job_boiler_plate
76
77     triggers:
78       - gerrit:
79           server-name: "{gerrit-server-name}"
80           trigger-on:
81             - patchset-created-event:
82                 exclude-drafts: "false"
83                 exclude-trivial-rebase: "false"
84                 exclude-no-code-change: "false"
85             - draft-published-event
86             - comment-added-contains-event:
87                 comment-contains-value: "recheck"
88             - comment-added-contains-event:
89                 comment-contains-value: "reverify"
90           projects:
91             - project-compare-type: "ANT"
92               project-pattern: "{project}"
93               branches:
94                 - branch-compare-type: "ANT"
95                   branch-pattern: "**/{branch}"
96               file-paths:
97                 - compare-type: REG_EXP
98                   pattern: ".*/?{path}/.*"
99               disable-strict-forbidden-file-verification: "true"
100               forbidden-file-paths:
101                 - compare-type: ANT
102                   pattern: "docs/**"
103           readable-message: true
104
105 - job-template:
106     # Job template for merge jobs
107
108     name: "{project-name}-{stream}-{type}-merge"
109     <<: *daaas_job_boiler_plate
110
111     gerrit_merge_triggers:
112       - change-merged-event
113       - comment-added-contains-event:
114           comment-contains-value: remerge$
115
116     triggers:
117       - gerrit:
118           server-name: "{gerrit-server-name}"
119           trigger-on: "{obj:gerrit_merge_triggers}"
120           projects:
121             - project-compare-type: "ANT"
122               project-pattern: "{project}"
123               branches:
124                 - branch-compare-type: "ANT"
125                   branch-pattern: "**/{branch}"
126               file-paths:
127                 - compare-type: REG_EXP
128                   pattern: ".*/?{path}/.*"
129               disable-strict-forbidden-file-verification: "true"
130               forbidden-file-paths:
131                 - compare-type: ANT
132                   pattern: "docs/**"
133           readable-message: true