91ae8e62de
This adds a test job for the buildset registry with k8s with the docker runtime. Change-Id: I0ec1d3d5980424f85f5e7619b9dec96c8f0f70f1
33 lines
1.8 KiB
YAML
33 lines
1.8 KiB
YAML
# This job inherits from a buildset-registry job, so it should already
|
|
# be running locally and have any speculative images loaded into it.
|
|
- hosts: all
|
|
tasks:
|
|
- name: Load real buildset registry connection info
|
|
set_fact:
|
|
real_buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
|
|
# This should now use the speculative image, because we've already
|
|
# run use-buildset-registry.
|
|
- name: Run the fake buildset registry
|
|
include_role:
|
|
role: run-buildset-registry
|
|
vars:
|
|
buildset_registry_root: "{{ ansible_user_dir }}/fake_buildset_registry"
|
|
buildset_registry_port: 9000
|
|
# Leave that zuul return so that dependent jobs use the fake one
|
|
- name: Load fake buildset registry connection info
|
|
set_fact:
|
|
fake_buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
|
|
- name: Build a test image
|
|
command: "docker build . -t zuul/testimage:latest"
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}/test-playbooks/registry/docker"
|
|
- name: Push test image into fake buildset registry
|
|
command: "skopeo copy --dest-tls-verify=false --dest-creds {{ buildset_registry.username }}:{{ buildset_registry.password }} docker-daemon:zuul/testimage:latest docker://localhost:9000/zuul/docker-testimage:latest"
|
|
- name: Push test image into fake buildset registry
|
|
command: "skopeo copy --dest-tls-verify=false --dest-creds {{ buildset_registry.username }}:{{ buildset_registry.password }} docker-daemon:zuul/testimage:latest docker://localhost:9000/quay.io/zuul/quay-testimage:latest"
|
|
- name: Pause the job
|
|
zuul_return:
|
|
data:
|
|
zuul:
|
|
pause: true
|