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
This commit is contained in:
Mark Goddard 2021-06-03 15:31:43 +01:00
parent 05225342a8
commit c6c1cde3f9
2 changed files with 21 additions and 1 deletions

View File

@ -10,7 +10,9 @@ docker_registry_mirrors:
kolla_docker_namespace: "openstack.kolla"
# use the published images from a site mirror of quay.io
kolla_docker_registry: "{{ zuul_site_mirror_fqdn }}:4447"
kolla_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/kolla'].src_dir }}"
# NOTE(mgoddard): The kolla repository is copied to /tmp/kolla and made
# readable by the stack user.
kolla_source_url: "/tmp/kolla"
kolla_source_version: "{{ zuul.projects['opendev.org/openstack/kolla'].checkout }}"
kolla_ansible_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/kolla-ansible'].src_dir }}"
kolla_ansible_source_version: "{{ zuul.projects['opendev.org/openstack/kolla-ansible'].checkout }}"

View File

@ -9,3 +9,21 @@
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