blob: 525952a60620832fe3443c92d2c7b50801223daf [file] [log] [blame]
pierventre4a959602020-11-02 14:46:19 +01001# tost-onos docker image building + aether publishing tasks
2
3- job-template:
4 id: tost-onos-docker-publish
5 name: 'tost-onos-docker-publish{name-extension}'
6 disabled: '{disable-job}'
7 description: |
8 Created by {id} job-template from ci-management/jjb/tost-onos-jobs.yaml, script pipeline/tost-onos-publish.groovy<br/>
9 Runs docker-build with the following env. variables - '{extraEnvironmentVars}' and then publish the image on {docker-registry}/{docker-repo}. <br/>
pierventre9692bbf2020-11-12 14:34:31 +010010 Triggered also at {timed}. <br/>
pierventre4a959602020-11-02 14:46:19 +010011
12 triggers:
13 - onf-infra-gerrit-trigger-merge:
14 gerrit-server-name: '{gerrit-server-name}'
15 project-regexp: '{project}'
16 branch-regexp: '{branch-regexp}'
17 file-include-regexp: '{all-files-regexp}'
18 dependency-jobs: '{dependency-jobs}'
pierventre9692bbf2020-11-12 14:34:31 +010019 - timed: '{timed}'
pierventre4a959602020-11-02 14:46:19 +010020
21 properties:
22 - onf-infra-onfstaff-private:
23 - onf-infra-properties:
24 build-days-to-keep: '{build-days-to-keep}'
25 artifact-num-to-keep: '{artifact-num-to-keep}'
26
27 wrappers:
28 - lf-infra-wrappers:
29 build-timeout: '{build-timeout}'
30 jenkins-ssh-credential: '{jenkins-ssh-credential}'
31
32 parameters:
33 - string:
34 name: buildNode
35 default: '{bigger-build-node}'
36 description: 'Name of the Jenkins build executor to run the job on'
37
38 - string:
39 name: gitUrl
40 default: '$GIT_URL/$GERRIT_PROJECT'
41 description: 'URL to the git repo'
42
43 - string:
44 name: GERRIT_PATCHSET_REVISION
45 default: 'master'
46 description: 'git ref to build (commit hash or tag)'
47
48 - string:
49 name: GERRIT_REFSPEC
50 default: 'refs/heads/master'
51 description: 'git refSpec to build (refs/changes/)'
52
53 - string:
54 name: GERRIT_PROJECT
55 default: 'tost-onos'
56 description: 'Name of the project in Gerrit'
57
58 - string:
59 name: GERRIT_BRANCH
60 default: 'master'
61 description: 'Branch of the project in Gerrit'
62
63 - string:
64 name: dockerRepo
65 default: '{docker-repo}'
66 description: "Docker repository to push to ('onosproject', etc.)"
67
68 - string:
69 name: dockerRegistry
70 default: '{docker-registry}'
71 description: "Docker registry to push to (blank for DockerHub)"
72
73 # AWS CPU arch names: `x86_64` `arm64` (which don't align to vendor names... *sigh*)
74 - string:
75 name: dockerArchList
76 default: 'x86_64'
77 description: "List of architectures to build containers on, pipe separated (nonfunctional currently)"
78
79 - string:
80 name: maintainers
81 default: '{maintainers}'
82 description: "The person that should be notified if this job fails"
83
84 - string:
85 name: extraEnvironmentVars
86 default: '{extraEnvironmentVars}'
87 description: "Provide extra environment variables to the build"
88
pierventre9692bbf2020-11-12 14:34:31 +010089 - string:
90 name: buildDate
91 default: '{buildDate}'
92 description: "To add the build date to the tag"
93
pierventre10be3042021-05-05 18:43:24 +020094 - string:
95 name: PROFILER
96 default: ''
97 description: "To enable the agent profiler"
98
pierventre4a959602020-11-02 14:46:19 +010099 project-type: pipeline
100 concurrent: true
101 extraEnvironmentVars: ""
102 sandbox: true
pierventre9692bbf2020-11-12 14:34:31 +0100103 buildDate: 'true'
104
105 dsl: !include-raw-escape: ../pipeline/tost-onos-publish.groovy
106
107- job-template:
108 id: weekly-tost-onos-docker-publish
109 name: 'weekly-tost-onos-docker-publish{name-extension}'
110 disabled: '{disable-job}'
111 description: |
112 Created by {id} job-template from ci-management/jjb/tost-onos-jobs.yaml, script pipeline/tost-onos-publish.groovy<br/>
113 Runs {timed} docker-build with the following env. variables - '{extraEnvironmentVars}' and then publish the image on {docker-registry}/{docker-repo}. <br/>
114
115 triggers:
116 - timed: '{timed}'
117
118 properties:
119 - onf-infra-onfstaff-private:
120 - onf-infra-properties:
121 build-days-to-keep: '{build-days-to-keep}'
122 artifact-num-to-keep: '{artifact-num-to-keep}'
123
124 wrappers:
125 - lf-infra-wrappers:
126 build-timeout: '{build-timeout}'
127 jenkins-ssh-credential: '{jenkins-ssh-credential}'
128
129 parameters:
130 - string:
131 name: buildNode
132 default: '{bigger-build-node}'
133 description: 'Name of the Jenkins build executor to run the job on'
134
135 - string:
136 name: gitUrl
137 default: '$GIT_URL/$GERRIT_PROJECT'
138 description: 'URL to the git repo'
139
140 - string:
141 name: GERRIT_PATCHSET_REVISION
142 default: 'master'
143 description: 'git ref to build (commit hash or tag)'
144
145 - string:
146 name: GERRIT_REFSPEC
147 default: 'refs/heads/master'
148 description: 'git refSpec to build (refs/changes/)'
149
150 - string:
151 name: GERRIT_PROJECT
152 default: 'tost-onos'
153 description: 'Name of the project in Gerrit'
154
155 - string:
156 name: GERRIT_BRANCH
157 default: 'master'
158 description: 'Branch of the project in Gerrit'
159
160 - string:
161 name: dockerRepo
162 default: '{docker-repo}'
163 description: "Docker repository to push to ('onosproject', etc.)"
164
165 - string:
166 name: dockerRegistry
167 default: '{docker-registry}'
168 description: "Docker registry to push to (blank for DockerHub)"
169
170 # AWS CPU arch names: `x86_64` `arm64` (which don't align to vendor names... *sigh*)
171 - string:
172 name: dockerArchList
173 default: 'x86_64'
174 description: "List of architectures to build containers on, pipe separated (nonfunctional currently)"
175
176 - string:
177 name: maintainers
178 default: '{maintainers}'
179 description: "The person that should be notified if this job fails"
180
181 - string:
182 name: extraEnvironmentVars
183 default: '{extraEnvironmentVars}'
184 description: "Provide extra environment variables to the build"
185
186 - string:
187 name: buildDate
188 default: '{buildDate}'
189 description: "To add the build date to the tag"
190
pierventred84c5862021-05-05 19:27:40 +0200191 - string:
192 name: PROFILER
193 default: ''
194 description: "To enable the agent profiler"
195
pierventre9692bbf2020-11-12 14:34:31 +0100196 project-type: pipeline
197 concurrent: true
198 extraEnvironmentVars: ""
199 sandbox: true
200 buildDate: 'true'
pierventre4a959602020-11-02 14:46:19 +0100201
202 dsl: !include-raw-escape: ../pipeline/tost-onos-publish.groovy