Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 1 | --- |
| 2 | # generic docker image building + dockerhub publishing tasks |
| 3 | |
| 4 | - job-template: |
| 5 | id: docker-publish |
| 6 | name: 'docker-publish_{project}' |
| 7 | description: | |
| 8 | Created by {id} job-template from ci-management/jjb/docker-publish.yaml |
| 9 | |
| 10 | triggers: |
| 11 | - cord-infra-gerrit-trigger-merge: |
| 12 | gerrit-server-name: '{gerrit-server-name}' |
| 13 | project-regexp: '^{project}$' |
| 14 | branch-regexp: '{all-branches-regexp}' |
| 15 | file-include-regexp: '{all-files-regexp}' |
| 16 | dependency-jobs: '{dependency-jobs}' |
| 17 | |
| 18 | properties: |
| 19 | - cord-infra-properties: |
| 20 | build-days-to-keep: '{build-days-to-keep}' |
| 21 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 22 | |
| 23 | wrappers: |
| 24 | - lf-infra-wrappers: |
Zack Williams | b030c65 | 2019-07-29 12:44:12 -0700 | [diff] [blame] | 25 | build-timeout: '{build-timeout}' |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 26 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 27 | |
| 28 | parameters: |
| 29 | - string: |
| 30 | name: executorNode |
| 31 | default: 'ubuntu16.04-basebuild-1c-2g' |
| 32 | description: 'Name of the Jenkins node to run the job on' |
| 33 | |
| 34 | - string: |
| 35 | name: gitUrl |
| 36 | default: '{gerrit-server-url}/{project}' |
| 37 | description: 'URL to the git repo' |
| 38 | |
| 39 | - string: |
Zack Williams | 38126df | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 40 | name: gitRef |
| 41 | default: '$GERRIT_PATCHSET_REVISION' |
| 42 | description: 'git ref to build (commit hash or tag)' |
| 43 | |
| 44 | - string: |
Zack Williams | 8d92d6d | 2019-04-16 18:12:12 -0700 | [diff] [blame] | 45 | name: projectName |
| 46 | default: '$GERRIT_PROJECT' |
| 47 | description: 'Name of the project in Gerrit' |
| 48 | |
| 49 | - string: |
| 50 | name: branchName |
| 51 | default: '$GERRIT_BRANCH' |
| 52 | description: 'Branch of the project in Gerrit' |
| 53 | |
| 54 | - string: |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 55 | name: dockerRepo |
| 56 | default: '{docker-repo}' |
| 57 | description: "Docker repository to push to ('opencord', 'xosproject', etc.)" |
| 58 | |
Zack Williams | 38126df | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 59 | - string: |
| 60 | name: dockerRegistry |
| 61 | default: '{docker-registry}' |
| 62 | description: "Docker registry to push to (blank for DockerHub)" |
| 63 | |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 64 | # AWS CPU arch names: `x86_64` `arm64` (which don't align to vendor names... *sigh*) |
| 65 | - string: |
| 66 | name: dockerArchList |
| 67 | default: 'x86_64' |
| 68 | description: "List of architectures to build containers on, pipe separated (nonfunctional currently)" |
| 69 | |
| 70 | project-type: pipeline |
| 71 | concurrent: true |
| 72 | |
| 73 | dsl: !include-raw-escape: pipeline/docker-publish.groovy |