Skip to content

Commit ff6143a

Browse files
committed
Temporarily inline telemetry-container-image-content-provider job
Copy the abstract job definition from feature-verification-tests into sg-core so that Zuul can resolve the parent job before the fvt PR merges. Remove this once infrawatch/feature-verification-tests#345 lands. Generated-By: Claude-Code claude-opus-4-6
1 parent a2a787d commit ff6143a

2 files changed

Lines changed: 58 additions & 2 deletions

File tree

.zuul.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
---
2+
# TODO: Once infrawatch/feature-verification-tests#345 merges, replace
3+
# sg-core-content-provider with parent: telemetry-container-image-content-provider
4+
# and remove the inlined playbook at ci/playbooks/.
25
- job:
36
name: sg-core-content-provider
4-
parent: telemetry-container-image-content-provider
7+
parent: cifmw-base-minimal
58
description: |
6-
Build sg-core container image from the current change.
9+
Build sg-core container image from the current change and serve
10+
it from a local registry for dependent jobs.
711
required-projects:
12+
- name: openstack-k8s-operators/ci-framework
13+
override-checkout: main
814
- name: openstack-k8s-operators/sg-core
15+
run:
16+
- ci/playbooks/container-image-content-provider.yml
917
vars:
1018
container_build_src: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/sg-core"
1119
container_build_image_name: sg-core
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
- name: Build and serve container image from review
3+
hosts: "{{ cifmw_target_host | default('localhost') }}"
4+
gather_facts: true
5+
tasks:
6+
- name: Discover registry IP
7+
ansible.builtin.set_fact:
8+
cifmw_rp_registry_ip: "{{ ansible_default_ipv4.address }}"
9+
10+
- name: Deploy local registry
11+
ansible.builtin.include_role:
12+
name: registry_deploy
13+
14+
- name: Get commit SHA
15+
ansible.builtin.command:
16+
cmd: git show-ref --head --hash head
17+
chdir: "{{ container_build_src }}"
18+
register: _container_sha
19+
20+
- name: Set image tag
21+
ansible.builtin.set_fact:
22+
_container_image_tag: "{{ _container_sha.stdout | trim }}"
23+
24+
- name: Set full image reference
25+
ansible.builtin.set_fact:
26+
_container_image_url: "{{ cifmw_rp_registry_ip }}:5001/{{ container_build_image_name }}:{{ _container_image_tag }}"
27+
28+
- name: Build container image
29+
ansible.builtin.command:
30+
cmd: >-
31+
make docker-build
32+
IMG={{ _container_image_url }}
33+
chdir: "{{ container_build_src }}"
34+
35+
- name: Push container image to local registry
36+
ansible.builtin.command:
37+
cmd: >-
38+
make docker-push
39+
IMG={{ _container_image_url }}
40+
chdir: "{{ container_build_src }}"
41+
42+
- name: Return image URL for dependent jobs
43+
vars:
44+
_return_data: >-
45+
{{ {'zuul': {'pause': true}}
46+
| combine({container_update_var_name: _container_image_url}) }}
47+
zuul_return:
48+
data: "{{ _return_data }}"

0 commit comments

Comments
 (0)