b5408ca3fc
- added space around jinja variables - use "name" argument on include_role, instead of undocumented role Change-Id: I0984ca391667ace24705b20dd60eddd90e3a281e
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:
|
|
name: 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
|