File tree Expand file tree Collapse file tree 5 files changed +104
-1
lines changed Expand file tree Collapse file tree 5 files changed +104
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ # This workflow queries the Test Pulp server to check that all image tags
3
+ # specified in kolla_image_tags are present.
4
+
5
+ name : Check container image tags
6
+ on :
7
+ workflow_call :
8
+ inputs :
9
+ kayobe_image :
10
+ description : Kayobe container image
11
+ type : string
12
+ required : true
13
+ secrets :
14
+ KAYOBE_VAULT_PASSWORD :
15
+ required : true
16
+
17
+ env :
18
+ ANSIBLE_FORCE_COLOR : True
19
+ jobs :
20
+ check-tags :
21
+ name : Check container image tags
22
+ if : github.repository == 'stackhpc/stackhpc-kayobe-config'
23
+ runs-on : [self-hosted, stackhpc-kayobe-config-aio]
24
+ permissions : {}
25
+ env :
26
+ KAYOBE_ENVIRONMENT : ci-aio
27
+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
28
+ KAYOBE_IMAGE : ${{ inputs.kayobe_image }}
29
+ steps :
30
+ - uses : actions/checkout@v4
31
+ with :
32
+ submodules : true
33
+
34
+ # The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
35
+ - name : Pull latest Kayobe image
36
+ run : |
37
+ sudo docker image pull $KAYOBE_IMAGE
38
+
39
+ - name : Check container image tags
40
+ run : |
41
+ sudo -E docker run -t --rm \
42
+ -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
43
+ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
44
+ $KAYOBE_IMAGE \
45
+ /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh \
46
+ '$KAYOBE_CONFIG_PATH/ansible/check-tags.yml'
47
+ # env:
48
+ # KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
Original file line number Diff line number Diff line change 41
41
uses : ./.github/workflows/stackhpc-build-kayobe-image.yml
42
42
if : github.repository == 'stackhpc/stackhpc-kayobe-config'
43
43
44
+ check-tags :
45
+ name : Check container image tags
46
+ needs :
47
+ - build-kayobe-image
48
+ uses : ./.github/workflows/stackhpc-check-tags.yml
49
+ with :
50
+ kayobe_image : ${{ needs.build-kayobe-image.outputs.kayobe_image }}
51
+ secrets : inherit
52
+ if : github.repository == 'stackhpc/stackhpc-kayobe-config'
53
+
44
54
all-in-one-ubuntu-jammy-ovs :
45
55
name : aio (Ubuntu Jammy OVS)
46
56
needs :
Original file line number Diff line number Diff line change
1
+ ---
2
+ # This playbook queries the Pulp server to check that all image tags specified
3
+ # in kolla_image_tags are present.
4
+
5
+ - name : Check whether tags exist in Pulp container registry
6
+ hosts : localhost
7
+ tasks :
8
+ - name : Query images and tags
9
+ command :
10
+ cmd : >-
11
+ {{ kayobe_config_path }}/../../tools/kolla-images.py list-tags
12
+ register : kolla_images_result
13
+ changed_when : false
14
+
15
+ - name : Set a fact about images and tags
16
+ set_fact :
17
+ kolla_images : " {{ kolla_images_result.stdout | from_yaml }}"
18
+
19
+ - name : Set a fact about the Pulp URL
20
+ set_fact :
21
+ pulp_url : " {{ stackhpc_repo_mirror_url }}"
22
+
23
+ # Use state=read and allow_missing=false to check for missing tags in test pulp.
24
+ - import_role :
25
+ name : stackhpc.pulp.pulp_container_content
26
+ vars :
27
+ pulp_container_content : >-
28
+ {%- set contents = [] -%}
29
+ {%- for image, tags in kolla_images.items() -%}
30
+ {%- set repository = kolla_docker_namespace ~ "/" ~ image -%}
31
+ {%- set content = {
32
+ "allow_missing": False,
33
+ "repository": repository,
34
+ "state": "read",
35
+ "tags": tags,
36
+ } -%}
37
+ {%- set _ = contents.append(content) -%}
38
+ {%- endfor -%}
39
+ {{ contents }}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ collections:
3
3
- name : stackhpc.cephadm
4
4
version : 1.14.0
5
5
- name : stackhpc.pulp
6
- version : 0.5.2
6
+ version : 0.5.4
7
7
- name : stackhpc.hashicorp
8
8
version : 2.4.0
9
9
roles :
Original file line number Diff line number Diff line change @@ -62,3 +62,9 @@ stackhpc_docker_registry_password: !vault |
62
62
38333133393730633666613965653364316162353337313330346164303631313731646461363461
63
63
3963323635373866630a633533376339363734626664333765313665623662613764363038383735
64
64
38646138376438643533376161376634653439386230353365316239613430363338
65
+
66
+ # Override Pulp credentials to allow querying container image tags in the
67
+ # check-tags.yml custom playbook.
68
+ pulp_url : " {{ stackhpc_repo_mirror_url }}"
69
+ pulp_username : " {{ stackhpc_docker_registry_username }}"
70
+ pulp_password : " {{ stackhpc_docker_registry_password }}"
You can’t perform that action at this time.
0 commit comments