kayobe/playbooks/kayobe-seed-base/run.yml
Mark Goddard c6c1cde3f9 CI: test base container image build in seed jobs
Currently we do not have any coverage of building container images. This
change adds a basic test of building the base image to the seed jobs.

A potential future enhancement could involve pushing to a local registry
running on the seed.

Change-Id: Id7378dd844aca7cb5634535308eba0f60342c81d
2021-06-08 13:47:04 +01:00

30 lines
1.1 KiB
YAML

---
- hosts: primary
environment:
KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}"
# Don't provision a seed VM - use the Zuul VM as the seed host.
KAYOBE_SEED_VM_PROVISION: 0
tasks:
- name: Ensure seed is deployed
shell:
cmd: "{{ kayobe_src_dir }}/dev/seed-deploy.sh &> {{ logs_dir }}/ansible/seed-deploy"
executable: /bin/bash
# NOTE(mgoddard): The stack user cannot read the kolla source code, which
# lives in the zuul user's home directory. Copy it to a readable location.
- name: Create a readable copy of kolla source code
become: true
copy:
src: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/kolla'].src_dir }}"
dest: /tmp
owner: stack
group: stack
remote_src: true
- name: Ensure base container image is built
shell:
cmd: >
source {{ kayobe_src_dir }}/dev/environment-setup.sh &&
kayobe seed container image build ^base &> {{ logs_dir }}/ansible/container-image-build
executable: /bin/bash