62e2dc596fe4f90aafe441e45b9ae8ba964e9654
[ci-management.git] / jjb / akraino-templates / akraino-jjb-docker.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-docker'
19     name: '{project-name}-{stream}-docker'
20     project-type: freestyle
21     node: '{build-node}'
22
23     parameters:
24       - lf-infra-parameters:
25           project: '{project}'
26           branch: '{branch}'
27           stream: '{stream}'
28           lftools-version: '{lftools-version}'
29
30     scm:
31       - lf-infra-gerrit-scm:
32           jenkins-ssh-credential: '{jenkins-ssh-credential}'
33           git-url: '{git-url}/{project}.git'
34           refspec: ''
35           branch: '{branch}'
36           submodule-recursive: '{submodule-recursive}'
37           submodule-timeout: '{submodule-timeout}'
38           choosing-strategy: default
39
40     builders:
41       - lf-update-java-alternatives:
42           java-version: '{java-version}'
43       - lf-infra-docker-login:
44           global-settings-file: '{global-settings-file}'
45           settings-file: '{mvn-settings}'
46       - inject:
47           properties-content: |
48               PROJECT={project}
49       - shell: !include-raw-escape:
50           - ../shell/build-docker.sh
51
52     triggers:
53       - timed: '@hourly'
54
55 - job-template:
56     id: 'akraino-project-stream-stage-docker'
57     name: '{project-name}-{stream}-stage-docker'
58     project-type: freestyle
59     node: '{build-node}'
60
61     parameters:
62       - lf-infra-parameters:
63           project: '{project}'
64           branch: '{branch}'
65           stream: '{stream}'
66           lftools-version: '{lftools-version}'
67       - string:
68           name: STAGING_BUILD
69           default: 'true'
70           description: Mark this as a staging build.
71
72     scm:
73       - lf-infra-gerrit-scm:
74           jenkins-ssh-credential: '{jenkins-ssh-credential}'
75           git-url: '{git-url}/{project}.git'
76           refspec: ''
77           branch: '{branch}'
78           submodule-recursive: '{submodule-recursive}'
79           submodule-timeout: '{submodule-timeout}'
80           choosing-strategy: default
81
82     builders:
83       - lf-update-java-alternatives:
84           java-version: '{java-version}'
85       - lf-infra-docker-login:
86           global-settings-file: '{global-settings-file}'
87           settings-file: '{mvn-settings}'
88       - inject:
89           properties-content: |
90               PROJECT={project}
91       - shell: !include-raw-escape:
92           - ../shell/get-upstream-autostage.sh
93           - ../shell/build-docker.sh
94
95     triggers:
96       - reverse:
97           jobs:
98             - '{project}-maven-stage-{stream}'
99             - 'yaml_builds-{stream}-stage-config'