blob: edbba0da930aafec3170879d254c67d195c55aae [file] [log] [blame]
pierventre65d85a22020-07-21 20:30:20 +02001---
2# generic docker image building + dockerhub publishing tasks
3
4- job-template:
5 id: private-docker-publish
6 name: 'private-docker-publish_{project}'
7 description: |
8 Created by {id} job-template from ci-management/jjb/private-docker-publish.yaml, script pipeline/docker-publish.groovy
9
10 triggers:
11 - onf-infra-gerrit-trigger-merge:
12 gerrit-server-name: '{gerrit-server-name}'
13 project-regexp: '{project}'
14 branch-regexp: '{branch-regexp}'
15 file-include-regexp: '{all-files-regexp}'
16 dependency-jobs: '{dependency-jobs}'
17
18 properties:
19 - raw:
20 xml: |
21 <hudson.security.AuthorizationMatrixProperty>
22 <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.NonInheritingStrategy"/>
23 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:JenkinsPowerusers</permission>
24 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:JenkinsPowerusers</permission>
25 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:JenkinsPowerusers</permission>
26 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:JenkinsPowerusers</permission>
27 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:JenkinsPowerusers</permission>
28 <permission>hudson.model.Item.Build:JenkinsPowerusers</permission>
29 <permission>hudson.model.Item.Cancel:JenkinsPowerusers</permission>
30 <permission>hudson.model.Item.Configure:JenkinsPowerusers</permission>
31 <permission>hudson.model.Item.Delete:JenkinsPowerusers</permission>
32 <permission>hudson.model.Item.Discover:JenkinsPowerusers</permission>
33 <permission>hudson.model.Item.Discover:ONFStaff</permission>
34 <permission>hudson.model.Item.ExtendedRead:JenkinsPowerusers</permission>
35 <permission>hudson.model.Item.Move:JenkinsPowerusers</permission>
36 <permission>hudson.model.Item.Read:JenkinsPowerusers</permission>
37 <permission>hudson.model.Item.Read:ONFStaff</permission>
38 <permission>hudson.model.Item.Workspace:JenkinsPowerusers</permission>
39 <permission>hudson.model.Run.Delete:JenkinsPowerusers</permission>
40 <permission>hudson.model.Run.Replay:JenkinsPowerusers</permission>
41 <permission>hudson.model.Run.Update:JenkinsPowerusers</permission>
42 </hudson.security.AuthorizationMatrixProperty>
43 - onf-infra-properties:
44 build-days-to-keep: '{build-days-to-keep}'
45 artifact-num-to-keep: '{artifact-num-to-keep}'
46
47 wrappers:
48 - lf-infra-wrappers:
49 build-timeout: '{build-timeout}'
50 jenkins-ssh-credential: '{jenkins-ssh-credential}'
51
52 parameters:
53 - string:
54 name: buildNode
55 default: '{bigger-build-node}'
56 description: 'Name of the Jenkins build executor to run the job on'
57
58 - string:
59 name: gitUrl
60 default: '$GIT_URL/$GERRIT_PROJECT'
61 description: 'URL to the git repo'
62
63 - string:
64 name: gitRef
65 default: '$GERRIT_PATCHSET_REVISION'
66 description: 'git ref to build (commit hash or tag)'
67
68 - string:
69 name: projectName
70 default: '$GERRIT_PROJECT'
71 description: 'Name of the project in Gerrit'
72
73 - string:
74 name: branchName
75 default: '$GERRIT_BRANCH'
76 description: 'Branch of the project in Gerrit'
77
78 - string:
79 name: dockerRepo
80 default: '{docker-repo}'
81 description: "Docker repository to push to ('onosproject', etc.)"
82
83 - string:
84 name: dockerRegistry
85 default: '{docker-registry}'
86 description: "Docker registry to push to (blank for DockerHub)"
87
88 # AWS CPU arch names: `x86_64` `arm64` (which don't align to vendor names... *sigh*)
89 - string:
90 name: dockerArchList
91 default: 'x86_64'
92 description: "List of architectures to build containers on, pipe separated (nonfunctional currently)"
93
94 - string:
95 name: maintainers
96 default: '{maintainers}'
97 description: "The person that should be notified if this job fails"
98
99 - string:
100 name: extraEnvironmentVars
101 default: '{extraEnvironmentVars}'
102 description: "Provide extra environment variables to the build"
103
104 project-type: pipeline
105 concurrent: true
106 extraEnvironmentVars: ""
107 sandbox: true
108
109 dsl: !include-raw-escape: ../pipeline/docker-publish.groovy