Revert "CI: Rename global-settings to mvn-glob..."
[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: '$GERRIT_REFSPEC'
35           branch: '$GERRIT_BRANCH'
36           submodule-recursive: '{submodule-recursive}'
37           submodule-timeout: '{submodule-timeout}'
38           submodule-disable: false
39           choosing-strategy: default
40
41     builders:
42       - lf-update-java-alternatives:
43           java-version: '{java-version}'
44       - lf-infra-docker-login:
45           global-settings-file: '{global-settings-file}'
46           settings-file: '{mvn-settings}'
47       - inject:
48           properties-content: |
49               PROJECT={project}
50       - shell: !include-raw-escape:
51           - ../shell/build-docker.sh
52
53     triggers:
54       - timed: '@daily'
55
56     publishers:
57       - lf-infra-publish
58
59 - job-template:
60     id: 'akraino-project-stream-stage-docker'
61     name: '{project-name}-{stream}-stage-docker'
62     project-type: freestyle
63     node: '{build-node}'
64
65     parameters:
66       - lf-infra-parameters:
67           project: '{project}'
68           branch: '{branch}'
69           stream: '{stream}'
70           lftools-version: '{lftools-version}'
71       - string:
72           name: STAGING_BUILD
73           default: 'true'
74           description: Mark this as a staging build.
75
76     scm:
77       - lf-infra-gerrit-scm:
78           jenkins-ssh-credential: '{jenkins-ssh-credential}'
79           git-url: '{git-url}/{project}.git'
80           refspec: '$GERRIT_REFSPEC'
81           branch: '$GERRIT_BRANCH'
82           submodule-recursive: '{submodule-recursive}'
83           submodule-timeout: '{submodule-timeout}'
84           submodule-disable: false
85           choosing-strategy: default
86
87     builders:
88       - lf-update-java-alternatives:
89           java-version: '{java-version}'
90       - lf-infra-docker-login:
91           global-settings-file: '{global-settings-file}'
92           settings-file: '{mvn-settings}'
93       - inject:
94           properties-content: |
95               PROJECT={project}
96       - shell: !include-raw-escape:
97           - ../shell/get-upstream-autostage.sh
98           - ../shell/build-docker.sh
99
100     triggers:
101       - reverse:
102           jobs:
103             - '{project}-maven-stage-{stream}'
104             - 'yaml_builds-{stream}-stage-config'
105
106     publishers:
107       - lf-infra-publish