Support imagePrefix and versions
Allow the user to specify an image prefix and a version tag. This updates the functional test to account for a recent change in Zuul which returns incomplete builds on the API endpoint. Change-Id: I49e82c790a518c1c9f5a463250b5b785eacde55a
This commit is contained in:
parent
ce1f8b338c
commit
5358c6dc0e
@ -122,7 +122,7 @@
|
|||||||
- name: get buillds results
|
- name: get buillds results
|
||||||
include_tasks: tasks/zuul_web_check.yaml
|
include_tasks: tasks/zuul_web_check.yaml
|
||||||
vars:
|
vars:
|
||||||
endpoint: "/api/tenant/local/builds"
|
endpoint: "/api/tenant/local/builds?complete=true"
|
||||||
|
|
||||||
- name: ensure success build
|
- name: ensure success build
|
||||||
assert:
|
assert:
|
||||||
|
@ -27,7 +27,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: launcher
|
- name: launcher
|
||||||
image: zuul/nodepool-launcher:latest
|
image: {{ spec.imagePrefix }}/nodepool-launcher:{{ spec.nodepoolImageVersion }}
|
||||||
env:
|
env:
|
||||||
- name: KUBECONFIG
|
- name: KUBECONFIG
|
||||||
value: /etc/kubernetes/kube.config
|
value: /etc/kubernetes/kube.config
|
||||||
|
@ -120,7 +120,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: scheduler
|
- name: scheduler
|
||||||
image: zuul/zuul-scheduler:{{ zuul_version }}
|
image: {{ spec.imagePrefix }}/zuul-scheduler:{{ spec.zuulImageVersion }}
|
||||||
command: ["/usr/local/bin/zuul-scheduler", "-f", "-d"]
|
command: ["/usr/local/bin/zuul-scheduler", "-f", "-d"]
|
||||||
ports:
|
ports:
|
||||||
- name: gearman
|
- name: gearman
|
||||||
@ -200,7 +200,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
image: zuul/zuul-web:{{ zuul_version }}
|
image: {{ spec.imagePrefix }}/zuul-web:{{ spec.zuulImageVersion }}
|
||||||
ports:
|
ports:
|
||||||
- name: zuul-web
|
- name: zuul-web
|
||||||
containerPort: 9000
|
containerPort: 9000
|
||||||
@ -252,7 +252,7 @@ spec:
|
|||||||
runAsGroup: 10001
|
runAsGroup: 10001
|
||||||
containers:
|
containers:
|
||||||
- name: executor
|
- name: executor
|
||||||
image: zuul/zuul-executor:{{ zuul_version }}
|
image: {{ spec.imagePrefix }}/zuul-executor:{{ spec.zuulImageVersion }}
|
||||||
command: ["/usr/local/bin/zuul-executor", "-f", "-d"]
|
command: ["/usr/local/bin/zuul-executor", "-f", "-d"]
|
||||||
ports:
|
ports:
|
||||||
- name: logs
|
- name: logs
|
||||||
@ -335,7 +335,7 @@ spec:
|
|||||||
runAsGroup: 10001
|
runAsGroup: 10001
|
||||||
containers:
|
containers:
|
||||||
- name: merger
|
- name: merger
|
||||||
image: zuul/zuul-merger:{{ zuul_version }}
|
image: {{ spec.imagePrefix }}/zuul-merger:{{ spec.zuulImageVersion }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: zuul-config
|
- name: zuul-config
|
||||||
mountPath: /etc/zuul
|
mountPath: /etc/zuul
|
||||||
|
@ -71,6 +71,10 @@ class Zuul:
|
|||||||
self.spec.setdefault('merger', {}).setdefault('count', 0)
|
self.spec.setdefault('merger', {}).setdefault('count', 0)
|
||||||
self.spec.setdefault('web', {}).setdefault('count', 1)
|
self.spec.setdefault('web', {}).setdefault('count', 1)
|
||||||
|
|
||||||
|
self.spec.setdefault('imagePrefix', 'docker.io/zuul')
|
||||||
|
self.spec.setdefault('zuulImageVersion', 'latest')
|
||||||
|
self.spec.setdefault('nodepoolImageVersion', 'latest')
|
||||||
|
|
||||||
self.cert_manager = certmanager.CertManager(
|
self.cert_manager = certmanager.CertManager(
|
||||||
self.api, self.namespace, self.log)
|
self.api, self.namespace, self.log)
|
||||||
self.installing_cert_manager = False
|
self.installing_cert_manager = False
|
||||||
@ -266,11 +270,11 @@ class Zuul:
|
|||||||
for provider_name, secret_name in\
|
for provider_name, secret_name in\
|
||||||
self.nodepool_provider_secrets.items():
|
self.nodepool_provider_secrets.items():
|
||||||
kw = {
|
kw = {
|
||||||
'zuul_version': '4.1.0',
|
|
||||||
'instance_name': self.name,
|
'instance_name': self.name,
|
||||||
'provider_name': provider_name,
|
'provider_name': provider_name,
|
||||||
'nodepool_config_secret_name': secret_name,
|
'nodepool_config_secret_name': secret_name,
|
||||||
'external_config': self.spec.get('externalConfig', {}),
|
'external_config': self.spec.get('externalConfig', {}),
|
||||||
|
'spec': self.spec,
|
||||||
}
|
}
|
||||||
utils.apply_file(self.api, 'nodepool-launcher.yaml',
|
utils.apply_file(self.api, 'nodepool-launcher.yaml',
|
||||||
namespace=self.namespace, **kw)
|
namespace=self.namespace, **kw)
|
||||||
@ -310,7 +314,6 @@ class Zuul:
|
|||||||
def create_zuul(self):
|
def create_zuul(self):
|
||||||
kw = {
|
kw = {
|
||||||
'zuul_conf_sha': self.zuul_conf_sha,
|
'zuul_conf_sha': self.zuul_conf_sha,
|
||||||
'zuul_version': '4.1.0',
|
|
||||||
'zuul_tenant_secret': self.tenant_secret,
|
'zuul_tenant_secret': self.tenant_secret,
|
||||||
'instance_name': self.name,
|
'instance_name': self.name,
|
||||||
'connections': self.spec['connections'],
|
'connections': self.spec['connections'],
|
||||||
|
Loading…
Reference in New Issue
Block a user