pierventre | f41b90c | 2020-07-15 16:26:02 +0200 | [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, 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 | - onf-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: |
| 25 | build-timeout: '{build-timeout}' |
| 26 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 27 | |
| 28 | parameters: |
| 29 | - string: |
| 30 | name: buildNode |
| 31 | default: '{bigger-build-node}' |
| 32 | description: 'Name of the Jenkins build executor to run the job on' |
| 33 | |
| 34 | - string: |
| 35 | name: gitUrl |
| 36 | default: '$GIT_URL/$GERRIT_PROJECT' |
| 37 | description: 'URL to the git repo' |
| 38 | |
| 39 | - string: |
| 40 | name: gitRef |
| 41 | default: '$GERRIT_PATCHSET_REVISION' |
| 42 | description: 'git ref to build (commit hash or tag)' |
| 43 | |
| 44 | - string: |
pierventre | 07ef37d | 2020-07-23 12:23:17 +0200 | [diff] [blame^] | 45 | name: gitRefSpec |
| 46 | default: '$GERRIT_REFSPEC' |
| 47 | description: 'git refSpec to build (refs/changes/)' |
| 48 | |
| 49 | - string: |
pierventre | f41b90c | 2020-07-15 16:26:02 +0200 | [diff] [blame] | 50 | name: projectName |
| 51 | default: '$GERRIT_PROJECT' |
| 52 | description: 'Name of the project in Gerrit' |
| 53 | |
| 54 | - string: |
| 55 | name: branchName |
| 56 | default: '$GERRIT_BRANCH' |
| 57 | description: 'Branch of the project in Gerrit' |
| 58 | |
| 59 | - string: |
| 60 | name: dockerRepo |
| 61 | default: '{docker-repo}' |
| 62 | description: "Docker repository to push to ('onosproject', etc.)" |
| 63 | |
| 64 | - string: |
| 65 | name: dockerRegistry |
| 66 | default: '{docker-registry}' |
| 67 | description: "Docker registry to push to (blank for DockerHub)" |
| 68 | |
| 69 | # AWS CPU arch names: `x86_64` `arm64` (which don't align to vendor names... *sigh*) |
| 70 | - string: |
| 71 | name: dockerArchList |
| 72 | default: 'x86_64' |
| 73 | description: "List of architectures to build containers on, pipe separated (nonfunctional currently)" |
| 74 | |
| 75 | - string: |
| 76 | name: maintainers |
| 77 | default: '{maintainers}' |
| 78 | description: "The person that should be notified if this job fails" |
| 79 | |
| 80 | - string: |
| 81 | name: extraEnvironmentVars |
| 82 | default: '{extraEnvironmentVars}' |
| 83 | description: "Provide extra environment variables to the build" |
| 84 | |
| 85 | project-type: pipeline |
| 86 | concurrent: true |
| 87 | extraEnvironmentVars: "" |
pierventre | fa867f7 | 2020-07-16 14:03:09 +0200 | [diff] [blame] | 88 | sandbox: true |
pierventre | f41b90c | 2020-07-15 16:26:02 +0200 | [diff] [blame] | 89 | |
| 90 | dsl: !include-raw-escape: ../pipeline/docker-publish.groovy |