Skip to content

Commit 9241b3a

Browse files
committed
CI: Add check-image-map and check-hierarchy to check-tags workflow
These commands ensure that the image map and hierarchy defined in kolla-images.py matches Kolla Ansible. Also update the path filter to run the check-tags workflow when pulp.yml or kolla-images.py is modified.
1 parent 1caf4a3 commit 9241b3a

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.github/path-filters.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ aio:
2323
check-tags:
2424
- '.github/workflows/stackhpc-check-tags.yml'
2525
- 'etc/kayobe/kolla-image-tags.yml'
26+
- 'etc/kayobe/pulp.yml'
27+
- 'tools/kolla-images.py'

.github/workflows/stackhpc-check-tags.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ jobs:
4646
run: |
4747
docker image pull $KAYOBE_IMAGE
4848
49+
- name: Check kolla-images.py image map and tag hierarchy
50+
run: |
51+
docker run -t --rm \
52+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
53+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
54+
$KAYOBE_IMAGE \
55+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh \
56+
'$KAYOBE_CONFIG_PATH/ansible/check-kolla-images-py.yml'
57+
4958
- name: Check container image tags
5059
run: |
5160
docker run -t --rm \
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
- name: Check kolla-images.py image map and tag hierarchy
3+
hosts: localhost
4+
gather_facts: false
5+
tasks:
6+
- name: Create a temporary directory
7+
ansible.builtin.tempfile:
8+
state: directory
9+
suffix: kolla-ansible
10+
register: tempdir_result
11+
12+
- name: Clone Kolla Ansible repository
13+
ansible.builtin.git:
14+
repo: "{{ stackhpc_kolla_ansible_source_url }}"
15+
version: "{{ stackhpc_kolla_ansible_source_version }}"
16+
dest: "{{ tempdir_result.path }}"
17+
18+
- name: Check image mapping
19+
ansible.builtin.command:
20+
cmd: >-
21+
{{ kayobe_config_path }}/../../tools/kolla-images.py
22+
check-image-map
23+
--kolla-ansible-path {{ tempdir_result.path }}
24+
25+
- name: Check tag hierarchy
26+
ansible.builtin.command:
27+
cmd: >-
28+
{{ kayobe_config_path }}/../../tools/kolla-images.py
29+
check-hierarchy
30+
--kolla-ansible-path {{ tempdir_result.path }}
31+
32+
- name: Remove temporary directory
33+
ansible.builtin.file:
34+
path: "{{ tempdir_result.path }}"
35+
state: absent

0 commit comments

Comments
 (0)