blob: 72004dc8d145a8ea6c7a43d00987cc78bafe719a [file] [log] [blame]
Kiranf5e41fc2018-02-09 15:34:47 -08001---
Bartek Grzybowskiad114ad2020-03-24 15:48:42 +01002- job-template: &verify_golang_bolierplate
Kiranf5e41fc2018-02-09 15:34:47 -08003 # Job template for Golang verify jobs
4 #
5 # The purpose of this job template is to run:
6 # 1. make build
7 #
Bartek Grzybowskic745ca62020-02-12 15:44:42 +01008 # golangver can be set to golang110, golang111 or golang112
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -07009 # depending on what version is needed by the project
10 # default is golang110
11 #
Kiranf5e41fc2018-02-09 15:34:47 -080012 # Required Variables:
13 # branch: git branch (eg. stable/lithium or master)
Bartek Grzybowskic745ca62020-02-12 15:44:42 +010014 #
15 # Optional Variables:
16 # script: build script to execute
17 # pattern: ant file-path pattern relative to the workspace used to
18 # trigger the job
Kiranf5e41fc2018-02-09 15:34:47 -080019
20 name: '{project-name}-{stream}-verify-golang'
21 path: '$WORKSPACE'
Bartek Grzybowskic745ca62020-02-12 15:44:42 +010022 pattern: '**'
23 script: ''
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -070024 golangver: 'golang110'
Kiranf5e41fc2018-02-09 15:34:47 -080025
26 project-type: freestyle
27 concurrent: true
28 node: '{build-node}'
29
30 properties:
31 - infra-properties:
32 build-days-to-keep: '{build-days-to-keep}'
33
34 parameters:
35 - infra-parameters:
36 project: '{project}'
37 branch: '{branch}'
38 refspec: 'refs/heads/{branch}'
39 artifacts: '{archive-artifacts}'
40
41 scm:
42 - gerrit-trigger-scm:
43 refspec: '$GERRIT_REFSPEC'
44 choosing-strategy: 'gerrit'
45 submodule-recursive: '{submodule-recursive}'
46
47 wrappers:
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -070048 - '{golangver}'
Kiranf5e41fc2018-02-09 15:34:47 -080049 - infra-wrappers:
50 build-timeout: '{build-timeout}'
51
52 triggers:
53 - gerrit-trigger-patch-submitted:
54 server: '{server-name}'
55 project: '{project}'
56 branch: '{branch}'
Bartek Grzybowskic745ca62020-02-12 15:44:42 +010057 files: '{pattern}'
Kiranf5e41fc2018-02-09 15:34:47 -080058
59 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -070060 - lf-infra-pre-build
Kiranf5e41fc2018-02-09 15:34:47 -080061 - provide-maven-settings:
62 global-settings-file: 'global-settings'
63 settings-file: '{mvn-settings}'
64 - shell: |
65 #!/bin/bash
Kiranf5e41fc2018-02-09 15:34:47 -080066 cd $WORKSPACE/{path}
67 make build
Bartek Grzybowskic745ca62020-02-12 15:44:42 +010068 - shell: '{script}'
Kiranf5e41fc2018-02-09 15:34:47 -080069
70 publishers:
Jessica Wagantall2a6a3802021-01-14 12:19:17 -080071 - lf-infra-publish
Kiranf5e41fc2018-02-09 15:34:47 -080072
73- job-template:
Bartek Grzybowskiad114ad2020-03-24 15:48:42 +010074 # Job template for Golang verify jobs with subproject support
75
76 <<: *verify_golang_bolierplate
77 name: '{project-name}-{stream}-{subproject}-verify-golang'
78
79- job-template:
Kiranf5e41fc2018-02-09 15:34:47 -080080 # Job template for Golang merge jobs
81 #
82 # The purpose of this job template is to run:
83 # 1. make deploy
84 #
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -070085 # golangver can be set to golang110 or golang111
86 # depending on what version is needed by the project
87 # default is golang110
88 #
Kiranf5e41fc2018-02-09 15:34:47 -080089 # Required Variables:
90 # branch: git branch (eg. stable/lithium or master)
91
92 name: '{project-name}-{stream}-merge-golang'
93 path: $WORKSPACE
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -070094 golangver: 'golang110'
Kiranf5e41fc2018-02-09 15:34:47 -080095
96 project-type: freestyle
97 node: '{build-node}'
98
99 properties:
100 - infra-properties:
101 build-days-to-keep: '{build-days-to-keep}'
102
103 parameters:
104 - infra-parameters:
105 project: '{project}'
106 branch: '{branch}'
107 refspec: 'refs/heads/{branch}'
108 artifacts: '{archive-artifacts}'
109 - maven-exec:
110 maven-version: '{maven-version}'
111
112 scm:
113 - gerrit-trigger-scm:
114 refspec: ''
115 choosing-strategy: 'default'
116 submodule-recursive: '{submodule-recursive}'
117
118 wrappers:
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -0700119 - '{golangver}'
Kiranf5e41fc2018-02-09 15:34:47 -0800120 - infra-wrappers:
121 build-timeout: '{build-timeout}'
122
123 triggers:
124 - gerrit-trigger-patch-merged:
125 server: '{server-name}'
126 project: '{project}'
127 branch: '{branch}'
128 files: '**'
129
130 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -0700131 - lf-infra-pre-build
Kiranf5e41fc2018-02-09 15:34:47 -0800132 - provide-maven-settings:
133 global-settings-file: 'global-settings'
134 settings-file: '{mvn-settings}'
135 - shell: |
136 #!/bin/bash
Kiranf5e41fc2018-02-09 15:34:47 -0800137 cd $WORKSPACE/{path}
138 make deploy
139
140 publishers:
Jessica Wagantall2a6a3802021-01-14 12:19:17 -0800141 - lf-infra-publish
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700142
143- job-template:
144 # Job template for building & pushing docker images
145 #
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -0700146 # golangver can be set to golang110 or golang111
147 # depending on what version is needed by the project
148 # default is golang110
149 #
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700150 # The purpose of this job template is to run:
151 # 1. login to the docker registry
152 # 2. run a specified shell builder
153 #
154
155 name: '{project-name}-{stream}-docker-golang-shell-daily'
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -0700156 golangver: 'golang110'
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700157 project-type: freestyle
Jessica Wagantall612da802020-03-31 10:44:03 -0700158 node: 'ubuntu1804-docker-8c-8g'
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700159 disabled: false
160 properties:
161 - infra-properties:
162 build-days-to-keep: '{build-days-to-keep}'
163
164 parameters:
165 - infra-parameters:
166 project: '{project}'
167 branch: '{branch}'
168 refspec: 'refs/heads/{branch}'
169 artifacts: '{archive-artifacts}'
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700170 scm:
171 - gerrit-trigger-scm:
172 refspec: ''
173 choosing-strategy: 'default'
174 submodule-recursive: '{submodule-recursive}'
175
176 wrappers:
Kiran Kaminenidf6e71f2018-10-24 12:16:13 -0700177 - '{golangver}'
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700178 - infra-wrappers:
179 build-timeout: '{build-timeout}'
180
181 triggers:
182 # 12 AM UTC
Gary Wu5f4277f2018-09-28 10:36:23 -0700183 - timed: '@daily'
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700184 - gerrit-trigger-release-manually:
185 server: '{server-name}'
186 project: '{project}'
187 branch: '{branch}'
188
189 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -0700190 - lf-infra-pre-build
Kiran Kamineni129b92b2018-03-15 16:09:02 -0700191 - provide-maven-settings:
192 global-settings-file: 'global-settings'
193 settings-file: '{mvn-settings}'
194
195 - docker-login
196
197 - shell: '{script}'
198
199 publishers:
Jessica Wagantall2a6a3802021-01-14 12:19:17 -0800200 - lf-infra-publish