blob: 3e03cf3c3e4cb15f46fe9fbd73f560013b64cfbe [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
pierventre4a959602020-11-02 14:46:19 +010094 project-type: pipeline
95 concurrent: true
96 extraEnvironmentVars: ""
97 sandbox: true
pierventre9692bbf2020-11-12 14:34:31 +010098 buildDate: 'true'
99
100 dsl: !include-raw-escape: ../pipeline/tost-onos-publish.groovy
101
102- job-template:
103 id: weekly-tost-onos-docker-publish
104 name: 'weekly-tost-onos-docker-publish{name-extension}'
105 disabled: '{disable-job}'
106 description: |
107 Created by {id} job-template from ci-management/jjb/tost-onos-jobs.yaml, script pipeline/tost-onos-publish.groovy<br/>
108 Runs {timed} docker-build with the following env. variables - '{extraEnvironmentVars}' and then publish the image on {docker-registry}/{docker-repo}. <br/>
109
110 triggers:
111 - timed: '{timed}'
112
113 properties:
114 - onf-infra-onfstaff-private:
115 - onf-infra-properties:
116 build-days-to-keep: '{build-days-to-keep}'
117 artifact-num-to-keep: '{artifact-num-to-keep}'
118
119 wrappers:
120 - lf-infra-wrappers:
121 build-timeout: '{build-timeout}'
122 jenkins-ssh-credential: '{jenkins-ssh-credential}'
123
124 parameters:
125 - string:
126 name: buildNode
127 default: '{bigger-build-node}'
128 description: 'Name of the Jenkins build executor to run the job on'
129
130 - string:
131 name: gitUrl
132 default: '$GIT_URL/$GERRIT_PROJECT'
133 description: 'URL to the git repo'
134
135 - string:
136 name: GERRIT_PATCHSET_REVISION
137 default: 'master'
138 description: 'git ref to build (commit hash or tag)'
139
140 - string:
141 name: GERRIT_REFSPEC
142 default: 'refs/heads/master'
143 description: 'git refSpec to build (refs/changes/)'
144
145 - string:
146 name: GERRIT_PROJECT
147 default: 'tost-onos'
148 description: 'Name of the project in Gerrit'
149
150 - string:
151 name: GERRIT_BRANCH
152 default: 'master'
153 description: 'Branch of the project in Gerrit'
154
155 - string:
156 name: dockerRepo
157 default: '{docker-repo}'
158 description: "Docker repository to push to ('onosproject', etc.)"
159
160 - string:
161 name: dockerRegistry
162 default: '{docker-registry}'
163 description: "Docker registry to push to (blank for DockerHub)"
164
165 # AWS CPU arch names: `x86_64` `arm64` (which don't align to vendor names... *sigh*)
166 - string:
167 name: dockerArchList
168 default: 'x86_64'
169 description: "List of architectures to build containers on, pipe separated (nonfunctional currently)"
170
171 - string:
172 name: maintainers
173 default: '{maintainers}'
174 description: "The person that should be notified if this job fails"
175
176 - string:
177 name: extraEnvironmentVars
178 default: '{extraEnvironmentVars}'
179 description: "Provide extra environment variables to the build"
180
181 - string:
182 name: buildDate
183 default: '{buildDate}'
184 description: "To add the build date to the tag"
185
186 project-type: pipeline
187 concurrent: true
188 extraEnvironmentVars: ""
189 sandbox: true
190 buildDate: 'true'
pierventre4a959602020-11-02 14:46:19 +0100191
192 dsl: !include-raw-escape: ../pipeline/tost-onos-publish.groovy