Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 1 | --- |
Joey Armstrong | db43bde | 2024-04-01 14:54:35 -0400 | [diff] [blame] | 2 | |
| 3 | # ----------------------------------------------------------------------- |
| 4 | # Copyright 2019-2024 Open Networking Foundation Contributors |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http:#www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # ----------------------------------------------------------------------- |
| 18 | # SPDX-FileCopyrightText: 2019-2024 Open Networking Foundation Contributors |
| 19 | # SPDX-License-Identifier: Apache-2.0 |
| 20 | # ----------------------------------------------------------------------- |
| 21 | # Intent: Generic docker image building + dockerhub publishing tasks |
| 22 | # ----------------------------------------------------------------------- |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 23 | |
| 24 | - job-template: |
| 25 | id: docker-publish |
| 26 | name: 'docker-publish_{project}' |
Joey Armstrong | db43bde | 2024-04-01 14:54:35 -0400 | [diff] [blame] | 27 | description: >+ |
| 28 | Created by {id} job-template from ci-management/jjb/docker-publish.yaml, |
| 29 | script pipeline/docker-publish.groovy |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 30 | |
| 31 | triggers: |
| 32 | - cord-infra-gerrit-trigger-merge: |
| 33 | gerrit-server-name: '{gerrit-server-name}' |
| 34 | project-regexp: '^{project}$' |
| 35 | branch-regexp: '{all-branches-regexp}' |
| 36 | file-include-regexp: '{all-files-regexp}' |
| 37 | dependency-jobs: '{dependency-jobs}' |
| 38 | |
| 39 | properties: |
| 40 | - cord-infra-properties: |
| 41 | build-days-to-keep: '{build-days-to-keep}' |
| 42 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 43 | |
| 44 | wrappers: |
| 45 | - lf-infra-wrappers: |
Zack Williams | b030c65 | 2019-07-29 12:44:12 -0700 | [diff] [blame] | 46 | build-timeout: '{build-timeout}' |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 47 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 48 | |
| 49 | parameters: |
| 50 | - string: |
Zack Williams | b329208 | 2019-10-11 17:15:18 -0700 | [diff] [blame] | 51 | name: buildNode |
Hung-Wei Chiu | f6cbde2 | 2021-04-22 22:15:23 -0700 | [diff] [blame] | 52 | default: 'ubuntu18.04-basebuild-1c-2g' |
Zack Williams | b329208 | 2019-10-11 17:15:18 -0700 | [diff] [blame] | 53 | description: 'Name of the Jenkins build executor to run the job on' |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 54 | |
| 55 | - string: |
| 56 | name: gitUrl |
| 57 | default: '{gerrit-server-url}/{project}' |
| 58 | description: 'URL to the git repo' |
| 59 | |
| 60 | - string: |
Zack Williams | 38126df | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 61 | name: gitRef |
| 62 | default: '$GERRIT_PATCHSET_REVISION' |
| 63 | description: 'git ref to build (commit hash or tag)' |
| 64 | |
| 65 | - string: |
Zack Williams | 8d92d6d | 2019-04-16 18:12:12 -0700 | [diff] [blame] | 66 | name: projectName |
| 67 | default: '$GERRIT_PROJECT' |
| 68 | description: 'Name of the project in Gerrit' |
| 69 | |
| 70 | - string: |
| 71 | name: branchName |
| 72 | default: '$GERRIT_BRANCH' |
| 73 | description: 'Branch of the project in Gerrit' |
| 74 | |
| 75 | - string: |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 76 | name: dockerRepo |
| 77 | default: '{docker-repo}' |
Joey Armstrong | db43bde | 2024-04-01 14:54:35 -0400 | [diff] [blame] | 78 | description: > |
| 79 | "Docker repository to push to ('opencord', 'xosproject', etc.)" |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 80 | |
Zack Williams | 38126df | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 81 | - string: |
| 82 | name: dockerRegistry |
| 83 | default: '{docker-registry}' |
| 84 | description: "Docker registry to push to (blank for DockerHub)" |
| 85 | |
Joey Armstrong | db43bde | 2024-04-01 14:54:35 -0400 | [diff] [blame] | 86 | # AWS CPU arch names: `x86_64` `arm64` |
| 87 | # (which don't align to vendor names... *sigh*) |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 88 | - string: |
| 89 | name: dockerArchList |
| 90 | default: 'x86_64' |
Joey Armstrong | db43bde | 2024-04-01 14:54:35 -0400 | [diff] [blame] | 91 | description: > |
| 92 | "List of architectures to build containers on, pipe separated |
| 93 | (nonfunctional currently)" |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 94 | |
Matteo Scandolo | 3aba73a | 2019-09-27 09:03:38 -0700 | [diff] [blame] | 95 | - string: |
| 96 | name: maintainers |
| 97 | default: '{maintainers}' |
Eric Ball | 122196c | 2024-11-06 16:48:12 -0800 | [diff] [blame] | 98 | description: "The person that should be notified if this job fails" |
Matteo Scandolo | 3aba73a | 2019-09-27 09:03:38 -0700 | [diff] [blame] | 99 | |
Matteo Scandolo | 8436612 | 2020-04-29 15:08:40 -0700 | [diff] [blame] | 100 | - string: |
| 101 | name: extraEnvironmentVars |
| 102 | default: '{extraEnvironmentVars}' |
| 103 | description: "Provide extra environment variables to the build" |
| 104 | |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 105 | project-type: pipeline |
| 106 | concurrent: true |
Matteo Scandolo | 8436612 | 2020-04-29 15:08:40 -0700 | [diff] [blame] | 107 | extraEnvironmentVars: "" |
Zack Williams | e16a9bd | 2019-03-21 23:02:24 -0700 | [diff] [blame] | 108 | |
| 109 | dsl: !include-raw-escape: pipeline/docker-publish.groovy |
Joey Armstrong | af679da | 2023-01-31 14:22:41 -0500 | [diff] [blame] | 110 | |
| 111 | # [EOF] |