blob: ad0913248d8f767d9393f472105f06313efcc7d5 [file] [log] [blame]
Zack Williamse16a9bd2019-03-21 23:02:24 -07001---
Joey Armstrongdb43bde2024-04-01 14:54:35 -04002
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 Williamse16a9bd2019-03-21 23:02:24 -070023
24- job-template:
25 id: docker-publish
26 name: 'docker-publish_{project}'
Joey Armstrongdb43bde2024-04-01 14:54:35 -040027 description: >+
28 Created by {id} job-template from ci-management/jjb/docker-publish.yaml,
29 script pipeline/docker-publish.groovy
Zack Williamse16a9bd2019-03-21 23:02:24 -070030
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 Williamsb030c652019-07-29 12:44:12 -070046 build-timeout: '{build-timeout}'
Zack Williamse16a9bd2019-03-21 23:02:24 -070047 jenkins-ssh-credential: '{jenkins-ssh-credential}'
48
49 parameters:
50 - string:
Zack Williamsb3292082019-10-11 17:15:18 -070051 name: buildNode
Hung-Wei Chiuf6cbde22021-04-22 22:15:23 -070052 default: 'ubuntu18.04-basebuild-1c-2g'
Zack Williamsb3292082019-10-11 17:15:18 -070053 description: 'Name of the Jenkins build executor to run the job on'
Zack Williamse16a9bd2019-03-21 23:02:24 -070054
55 - string:
56 name: gitUrl
57 default: '{gerrit-server-url}/{project}'
58 description: 'URL to the git repo'
59
60 - string:
Zack Williams38126df2019-03-21 23:02:24 -070061 name: gitRef
62 default: '$GERRIT_PATCHSET_REVISION'
63 description: 'git ref to build (commit hash or tag)'
64
65 - string:
Zack Williams8d92d6d2019-04-16 18:12:12 -070066 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 Williamse16a9bd2019-03-21 23:02:24 -070076 name: dockerRepo
77 default: '{docker-repo}'
Joey Armstrongdb43bde2024-04-01 14:54:35 -040078 description: >
79 "Docker repository to push to ('opencord', 'xosproject', etc.)"
Zack Williamse16a9bd2019-03-21 23:02:24 -070080
Zack Williams38126df2019-03-21 23:02:24 -070081 - string:
82 name: dockerRegistry
83 default: '{docker-registry}'
84 description: "Docker registry to push to (blank for DockerHub)"
85
Joey Armstrongdb43bde2024-04-01 14:54:35 -040086 # AWS CPU arch names: `x86_64` `arm64`
87 # (which don't align to vendor names... *sigh*)
Zack Williamse16a9bd2019-03-21 23:02:24 -070088 - string:
89 name: dockerArchList
90 default: 'x86_64'
Joey Armstrongdb43bde2024-04-01 14:54:35 -040091 description: >
92 "List of architectures to build containers on, pipe separated
93 (nonfunctional currently)"
Zack Williamse16a9bd2019-03-21 23:02:24 -070094
Matteo Scandolo3aba73a2019-09-27 09:03:38 -070095 - string:
96 name: maintainers
97 default: '{maintainers}'
98 description: "The person that sould be notified if this job fails"
99
Matteo Scandolo84366122020-04-29 15:08:40 -0700100 - string:
101 name: extraEnvironmentVars
102 default: '{extraEnvironmentVars}'
103 description: "Provide extra environment variables to the build"
104
Zack Williamse16a9bd2019-03-21 23:02:24 -0700105 project-type: pipeline
106 concurrent: true
Matteo Scandolo84366122020-04-29 15:08:40 -0700107 extraEnvironmentVars: ""
Zack Williamse16a9bd2019-03-21 23:02:24 -0700108
109 dsl: !include-raw-escape: pipeline/docker-publish.groovy
Joey Armstrongaf679da2023-01-31 14:22:41 -0500110
111# [EOF]