Merge "New JJB files for Docker container builds"
[ci-management.git] / jjb / akraino-templates / akraino-jjb-templates.yaml
1 ---
2 #
3 # Copyright (c) 2018 AT&T Intellectual Property. 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 - job-template:
18     id: akraino-project-stream-release-config
19     name: '{project}-{stream}-release-config'
20     project-type: freestyle
21     node: '{build-node}'
22
23     gerrit_merge_triggers:
24       - change-merged-event
25       - comment-added-contains-event:
26           comment-contains-value: remerge$
27
28     gerrit_trigger_file_paths:
29       - compare-type: REG_EXP
30         pattern: '.*'
31
32     parameters:
33       - lf-infra-parameters:
34           project: '{project}'
35           branch: '{branch}'
36           stream: '{stream}'
37           lftools-version: '{lftools-version}'
38       - lf-infra-maven-parameters:
39           mvn-opts: '{mvn-opts}'
40           mvn-params: '{mvn-params}'
41           mvn-version: '{mvn-version}'
42           staging-profile-id: '{staging-profile-id}'
43
44     scm:
45       - lf-infra-gerrit-scm:
46           jenkins-ssh-credential: '{jenkins-ssh-credential}'
47           git-url: '{git-url}/{project}.git'
48           refspec: '{refspec}'
49           branch: '{branch}'
50           submodule-recursive: '{submodule-recursive}'
51           choosing-strategy: default
52
53     nexus-shapshot-repo: snapshots
54     builders:
55       - lf-maven-install:
56           mvn-version: '{mvn-version}'
57       - lf-update-java-alternatives:
58           java-version: '{java-version}'
59       - lf-provide-maven-settings:
60           global-settings-file: '{global-settings-file}'
61           settings-file: '{mvn-settings}'
62       - lf-infra-create-netrc:
63           server-id: '{mvn-staging-id}'
64       - inject:
65           properties-content: |
66               MAVEN_REPO_URL={maven-repo-url}
67               REPO_ID={repo-id}
68               GROUP_ID={group-id}
69               UPLOAD_FILES_PATH={upload-files-dir}
70               PROJECT={project}
71       - shell: !include-raw-escape:
72           - ../shell/make-tar.sh
73           - ../global-jjb/shell/common-variables.sh
74           - ../global-jjb/shell/lftools-install.sh
75           - ../global-jjb/shell/deploy-maven-file.sh
76       - lf-provide-maven-settings-cleanup
77
78     triggers:
79       - timed: '{obj:cron}'
80       - gerrit:
81           server-name: '{gerrit-server-name}'
82           trigger-on: '{obj:gerrit_merge_triggers}'
83           projects:
84             - project-compare-type: ANT
85               project-pattern: '{project}'
86               branches:
87                 - branch-compare-type: ANT
88                   branch-pattern: '**/{branch}'
89               file-paths: '{obj:gerrit_trigger_file_paths}'