Publish zuul-operator to quay.io
* non-ci tested scripts need updating - these are intended for local development workflows. * This now publishes the operator to quay.io/zuul-ci * This is mostly a rework of https://review.opendev.org/c/zuul/zuul-operator/+/881245 and https://review.opendev.org/c/zuul/zuul-operator/+/924870 with much appreciation and credits to original authors Change-Id: I0ffd39fceeaf4947ed329dd4ddb7283cdc98df86
This commit is contained in:
parent
c74b147fe7
commit
b723bc761b
65
.zuul.yaml
65
.zuul.yaml
@ -25,7 +25,7 @@
|
||||
- job:
|
||||
description: Image and buildset registry job
|
||||
name: zuul-operator-build-image
|
||||
parent: opendev-build-docker-image
|
||||
parent: opendev-build-container-image
|
||||
allowed-projects: zuul/zuul-operator
|
||||
requires:
|
||||
- zuul-container-image
|
||||
@ -37,40 +37,55 @@
|
||||
- zuul-operator-container-image
|
||||
vars: &image_vars
|
||||
zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/zuul-operator'].src_dir }}"
|
||||
docker_registry: docker.io
|
||||
docker_images:
|
||||
promote_container_image_method: intermediate-registry
|
||||
promote_container_image_job: zuul-operator-upload-image
|
||||
container_command: docker
|
||||
container_images:
|
||||
- context: .
|
||||
dockerfile: build/Dockerfile
|
||||
repository: zuul/zuul-operator
|
||||
container_filename: build/Dockerfile
|
||||
registry: quay.io
|
||||
repository: quay.io/zuul-ci/zuul-operator
|
||||
tags:
|
||||
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
|
||||
# Otherwise: ['latest']
|
||||
"{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
|
||||
|
||||
- secret:
|
||||
name: zuul-operator-dockerhub
|
||||
name: zuul-operator-registry-credentials
|
||||
data:
|
||||
username: zuulzuul
|
||||
quay.io:
|
||||
username: zuul-ci+opendevzuul
|
||||
password: !encrypted/pkcs1-oaep
|
||||
- QVrNMxcxfu35rLxt2m/ZGWPRHDm0rbw/rybpkbuL8B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vQ
|
||||
nmJMvnMKV5KF8Mcqt+T0esX8A1pkyrfpcanZa5X3F3ukl90UVH3Pt+MhDn5xjA=
|
||||
|
||||
- job:
|
||||
description: Build Docker images and upload to Docker Hub.
|
||||
description: Build container images and upload.
|
||||
name: zuul-operator-upload-image
|
||||
parent: opendev-upload-docker-image
|
||||
parent: opendev-upload-container-image
|
||||
allowed-projects: zuul/zuul-operator
|
||||
secrets:
|
||||
name: docker_credentials
|
||||
secret: zuul-operator-dockerhub
|
||||
name: container_registry_credentials
|
||||
secret: zuul-operator-registry-credentials
|
||||
pass-to-parent: true
|
||||
requires:
|
||||
- zuul-container-image
|
||||
@ -85,11 +100,11 @@
|
||||
- job:
|
||||
description: Promote previously uploaded images.
|
||||
name: zuul-operator-promote-image
|
||||
parent: opendev-promote-docker-image
|
||||
parent: opendev-promote-container-image
|
||||
allowed-projects: zuul/zuul-operator
|
||||
secrets:
|
||||
name: docker_credentials
|
||||
secret: zuul-operator-dockerhub
|
||||
name: container_registry_credentials
|
||||
secret: zuul-operator-registry-credentials
|
||||
pass-to-parent: true
|
||||
nodeset:
|
||||
nodes: []
|
||||
@ -119,4 +134,4 @@
|
||||
- zuul-operator-upload-image:
|
||||
vars:
|
||||
<<: *image_vars
|
||||
upload_docker_image_promote: false
|
||||
upload_container_image_promote: false
|
||||
|
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
||||
image:
|
||||
podman build -f build/Dockerfile -t docker.io/zuul/zuul-operator .
|
||||
podman build -f build/Dockerfile -t quay.io/zuul-ci/zuul-operator .
|
||||
|
||||
install:
|
||||
kubectl apply -f deploy/crds/zuul-ci_v1alpha2_zuul_crd.yaml -f deploy/rbac-admin.yaml -f deploy/operator.yaml
|
||||
|
@ -3,7 +3,7 @@ kind: Zuul
|
||||
metadata:
|
||||
name: zuul
|
||||
spec:
|
||||
imagePrefix: docker.io/zuul
|
||||
imagePrefix: quay.io/zuul-ci
|
||||
executor:
|
||||
count: 1
|
||||
sshkey:
|
||||
|
@ -15,5 +15,5 @@ spec:
|
||||
serviceAccountName: zuul-operator
|
||||
containers:
|
||||
- name: operator
|
||||
image: "docker.io/zuul/zuul-operator"
|
||||
image: "quay.io/zuul-ci/zuul-operator"
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
|
@ -232,7 +232,7 @@ verbatim):
|
||||
apiVersion: zuul-ci.org/v1alpha2
|
||||
kind: Zuul
|
||||
spec:
|
||||
imagePrefix: docker.io/zuul
|
||||
imagePrefix: quay.io/zuul-ci
|
||||
imagePullSecrets:
|
||||
- name: my-docker-secret
|
||||
zuulImageVersion: latest
|
||||
@ -289,7 +289,7 @@ verbatim):
|
||||
.. attr:: spec
|
||||
|
||||
.. attr:: imagePrefix
|
||||
:default: docker.io/zuul
|
||||
:default: quay.io/zuul-ci
|
||||
|
||||
The prefix to use for images. The image names are fixed
|
||||
(``zuul-executor``, etc). However, changing the prefix will
|
||||
|
@ -14,7 +14,6 @@
|
||||
- ingress
|
||||
ensure_kubernetes_bin_path: /usr/local/bin
|
||||
- role: use-buildset-registry
|
||||
buildset_registry_docker_user: root
|
||||
post_tasks:
|
||||
- name: Install ansible requirements
|
||||
become: true
|
||||
|
@ -72,7 +72,7 @@
|
||||
labels:
|
||||
- name: pod-fedora-40
|
||||
type: pod
|
||||
image: docker.io/fedora:40
|
||||
image: quay.io/fedora/fedora:40
|
||||
python-path: /bin/python3
|
||||
- name: static-vms
|
||||
driver: static
|
||||
|
@ -14,6 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(jan.gutter): this local developer script still references images from a
|
||||
# previous release of zuul-operator.
|
||||
|
||||
KIND="${KIND:-kind}"
|
||||
KUBECTL="${KUBECTL:-kubectl}"
|
||||
DOCKER="${DOCKER:-docker}"
|
||||
|
@ -86,7 +86,7 @@ class Zuul:
|
||||
self.manage_registry_cert = ('secretName' not in registry_tls)
|
||||
registry_tls.setdefault('secretName', 'zuul-registry-tls')
|
||||
|
||||
self.spec.setdefault('imagePrefix', 'docker.io/zuul')
|
||||
self.spec.setdefault('imagePrefix', 'quay.io/zuul-ci')
|
||||
self.spec.setdefault('imagePullSecrets', [])
|
||||
self.spec.setdefault('zuulImageVersion', 'latest')
|
||||
self.spec.setdefault('zuulPreviewImageVersion', 'latest')
|
||||
|
Loading…
Reference in New Issue
Block a user