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:
|
- job:
|
||||||
description: Image and buildset registry job
|
description: Image and buildset registry job
|
||||||
name: zuul-operator-build-image
|
name: zuul-operator-build-image
|
||||||
parent: opendev-build-docker-image
|
parent: opendev-build-container-image
|
||||||
allowed-projects: zuul/zuul-operator
|
allowed-projects: zuul/zuul-operator
|
||||||
requires:
|
requires:
|
||||||
- zuul-container-image
|
- zuul-container-image
|
||||||
@ -37,40 +37,55 @@
|
|||||||
- zuul-operator-container-image
|
- zuul-operator-container-image
|
||||||
vars: &image_vars
|
vars: &image_vars
|
||||||
zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/zuul-operator'].src_dir }}"
|
zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/zuul-operator'].src_dir }}"
|
||||||
docker_registry: docker.io
|
promote_container_image_method: intermediate-registry
|
||||||
docker_images:
|
promote_container_image_job: zuul-operator-upload-image
|
||||||
|
container_command: docker
|
||||||
|
container_images:
|
||||||
- context: .
|
- context: .
|
||||||
dockerfile: build/Dockerfile
|
container_filename: build/Dockerfile
|
||||||
repository: zuul/zuul-operator
|
registry: quay.io
|
||||||
|
repository: quay.io/zuul-ci/zuul-operator
|
||||||
tags:
|
tags:
|
||||||
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
|
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
|
||||||
# Otherwise: ['latest']
|
# Otherwise: ['latest']
|
||||||
"{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
|
"{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
|
||||||
|
|
||||||
- secret:
|
- secret:
|
||||||
name: zuul-operator-dockerhub
|
name: zuul-operator-registry-credentials
|
||||||
data:
|
data:
|
||||||
username: zuulzuul
|
quay.io:
|
||||||
|
username: zuul-ci+opendevzuul
|
||||||
password: !encrypted/pkcs1-oaep
|
password: !encrypted/pkcs1-oaep
|
||||||
- QVrNMxcxfu35rLxt2m/ZGWPRHDm0rbw/rybpkbuL8B7v0CvJjgsLxfZ2uonMRINk53gex
|
- QEH6ht5DiBnOOaANKQvuLB6Ebe2w9tsnyVKbn7o+ULtt3Yl4og4m5pDjDHriUhyiTUFn8
|
||||||
TN9Y6vdM3YUu/Bdu4Z7cTKV+ohBRdCbEzJAVHJGclYRAFVzAMLDgKWZRFNrJVY1/0U9AZ
|
lBh21BNtxg0zpjezUPNMIZQLg3lcmQZ29sZm6c3rIWcy9VmU287rZCN725AKzXYsy80VT
|
||||||
a4F32AS8hWAdH03Ntv77cK+NX/y0pSAySin7o45XrHAA21vAASp9PSGLCSCB5pVfHELyR
|
1Glk7GlyH9CNG2foUfEB+NY1rfjYTaGVJiz3x/SXe4LuSZZftyRyZlOZJ8QTw5cKKu7kz
|
||||||
lgpu4+NMh2ocbbDwzQFAJbYgb60OYRYlsvI4ECCvDDm2Jxma6iOYnSe62E8v/K7fhFzVr
|
xuiTwY9CaARkqyBULnf8XY4DeVYVq7E63UBMJ964BFm+KgBQQr1UUvP+TYC9YOMFzTZkO
|
||||||
orBystkKaOy1154aGYTajtR0vebTGw6XJt4SYID3dHKS9XTwjpTEJySfFtSRDHDi0lhdN
|
EdceMMsZPYJhlM3FQXCEzfTlo+aEGijuFFpEGLhy+vd1J3PMRbrLHG1JfAK7bIXBSx8QV
|
||||||
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
|
7P7hmyCh3A7EURGNF2OkY8xKbwZHaKmUmKSKuhzxSYpThciJS6r0MLGswYgq9cDUUkQU7
|
||||||
|
uDQQPin6uDzmwH/I8g6eB9mjmAKc0yPpb4TmVQVQIy9bT5A+3RAWhv7FAzJZCsQRtrE/2
|
||||||
|
gChuGv3MCGHxrZr7DhI5A77a7vqxp4YR38OmKdCe2VfL0alSJsrzp1UGZKW7/uBKZjKMw
|
||||||
|
Mx4uE3yr5HyA0MCI21BXjWJYClFaSJ7FFFxsoCpYgVYzWM5CKGsytZYuWffuWHdnL+JdO
|
||||||
|
44OmxSw4On0E9vf0mSgMlY5JIYIwhoDWhPTI0lGgf4YBnOFnK1o2LLpv0BT/HopkgdJvQ
|
||||||
|
nmJMvnMKV5KF8Mcqt+T0esX8A1pkyrfpcanZa5X3F3ukl90UVH3Pt+MhDn5xjA=
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
description: Build Docker images and upload to Docker Hub.
|
description: Build container images and upload.
|
||||||
name: zuul-operator-upload-image
|
name: zuul-operator-upload-image
|
||||||
parent: opendev-upload-docker-image
|
parent: opendev-upload-container-image
|
||||||
allowed-projects: zuul/zuul-operator
|
allowed-projects: zuul/zuul-operator
|
||||||
secrets:
|
secrets:
|
||||||
name: docker_credentials
|
name: container_registry_credentials
|
||||||
secret: zuul-operator-dockerhub
|
secret: zuul-operator-registry-credentials
|
||||||
pass-to-parent: true
|
pass-to-parent: true
|
||||||
requires:
|
requires:
|
||||||
- zuul-container-image
|
- zuul-container-image
|
||||||
@ -85,11 +100,11 @@
|
|||||||
- job:
|
- job:
|
||||||
description: Promote previously uploaded images.
|
description: Promote previously uploaded images.
|
||||||
name: zuul-operator-promote-image
|
name: zuul-operator-promote-image
|
||||||
parent: opendev-promote-docker-image
|
parent: opendev-promote-container-image
|
||||||
allowed-projects: zuul/zuul-operator
|
allowed-projects: zuul/zuul-operator
|
||||||
secrets:
|
secrets:
|
||||||
name: docker_credentials
|
name: container_registry_credentials
|
||||||
secret: zuul-operator-dockerhub
|
secret: zuul-operator-registry-credentials
|
||||||
pass-to-parent: true
|
pass-to-parent: true
|
||||||
nodeset:
|
nodeset:
|
||||||
nodes: []
|
nodes: []
|
||||||
@ -119,4 +134,4 @@
|
|||||||
- zuul-operator-upload-image:
|
- zuul-operator-upload-image:
|
||||||
vars:
|
vars:
|
||||||
<<: *image_vars
|
<<: *image_vars
|
||||||
upload_docker_image_promote: false
|
upload_container_image_promote: false
|
||||||
|
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
image:
|
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:
|
install:
|
||||||
kubectl apply -f deploy/crds/zuul-ci_v1alpha2_zuul_crd.yaml -f deploy/rbac-admin.yaml -f deploy/operator.yaml
|
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:
|
metadata:
|
||||||
name: zuul
|
name: zuul
|
||||||
spec:
|
spec:
|
||||||
imagePrefix: docker.io/zuul
|
imagePrefix: quay.io/zuul-ci
|
||||||
executor:
|
executor:
|
||||||
count: 1
|
count: 1
|
||||||
sshkey:
|
sshkey:
|
||||||
|
@ -15,5 +15,5 @@ spec:
|
|||||||
serviceAccountName: zuul-operator
|
serviceAccountName: zuul-operator
|
||||||
containers:
|
containers:
|
||||||
- name: operator
|
- name: operator
|
||||||
image: "docker.io/zuul/zuul-operator"
|
image: "quay.io/zuul-ci/zuul-operator"
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
@ -232,7 +232,7 @@ verbatim):
|
|||||||
apiVersion: zuul-ci.org/v1alpha2
|
apiVersion: zuul-ci.org/v1alpha2
|
||||||
kind: Zuul
|
kind: Zuul
|
||||||
spec:
|
spec:
|
||||||
imagePrefix: docker.io/zuul
|
imagePrefix: quay.io/zuul-ci
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: my-docker-secret
|
- name: my-docker-secret
|
||||||
zuulImageVersion: latest
|
zuulImageVersion: latest
|
||||||
@ -289,7 +289,7 @@ verbatim):
|
|||||||
.. attr:: spec
|
.. attr:: spec
|
||||||
|
|
||||||
.. attr:: imagePrefix
|
.. attr:: imagePrefix
|
||||||
:default: docker.io/zuul
|
:default: quay.io/zuul-ci
|
||||||
|
|
||||||
The prefix to use for images. The image names are fixed
|
The prefix to use for images. The image names are fixed
|
||||||
(``zuul-executor``, etc). However, changing the prefix will
|
(``zuul-executor``, etc). However, changing the prefix will
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
- ingress
|
- ingress
|
||||||
ensure_kubernetes_bin_path: /usr/local/bin
|
ensure_kubernetes_bin_path: /usr/local/bin
|
||||||
- role: use-buildset-registry
|
- role: use-buildset-registry
|
||||||
buildset_registry_docker_user: root
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Install ansible requirements
|
- name: Install ansible requirements
|
||||||
become: true
|
become: true
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
labels:
|
labels:
|
||||||
- name: pod-fedora-40
|
- name: pod-fedora-40
|
||||||
type: pod
|
type: pod
|
||||||
image: docker.io/fedora:40
|
image: quay.io/fedora/fedora:40
|
||||||
python-path: /bin/python3
|
python-path: /bin/python3
|
||||||
- name: static-vms
|
- name: static-vms
|
||||||
driver: static
|
driver: static
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
# NOTE(jan.gutter): this local developer script still references images from a
|
||||||
|
# previous release of zuul-operator.
|
||||||
|
|
||||||
KIND="${KIND:-kind}"
|
KIND="${KIND:-kind}"
|
||||||
KUBECTL="${KUBECTL:-kubectl}"
|
KUBECTL="${KUBECTL:-kubectl}"
|
||||||
DOCKER="${DOCKER:-docker}"
|
DOCKER="${DOCKER:-docker}"
|
||||||
|
@ -86,7 +86,7 @@ class Zuul:
|
|||||||
self.manage_registry_cert = ('secretName' not in registry_tls)
|
self.manage_registry_cert = ('secretName' not in registry_tls)
|
||||||
registry_tls.setdefault('secretName', 'zuul-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('imagePullSecrets', [])
|
||||||
self.spec.setdefault('zuulImageVersion', 'latest')
|
self.spec.setdefault('zuulImageVersion', 'latest')
|
||||||
self.spec.setdefault('zuulPreviewImageVersion', 'latest')
|
self.spec.setdefault('zuulPreviewImageVersion', 'latest')
|
||||||
|
Loading…
Reference in New Issue
Block a user