Skip to content

Commit 1e221f3

Browse files
Disable latest path for Pulp artifacts (#1439)
* Use terraform v2 * Disable latest path for Pulp artifacts * Ensure correct release is built * Fix Rocky IPA version * Distribution release variable
1 parent 479792c commit 1e221f3

File tree

4 files changed

+7
-35
lines changed

4 files changed

+7
-35
lines changed

.github/workflows/ipa-image-build.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
pip install -r ../src/kayobe-config/requirements.txt
7777
7878
- name: Install terraform
79-
uses: hashicorp/setup-terraform@v3
79+
uses: hashicorp/setup-terraform@v2
8080

8181
- name: Initialise terraform
8282
run: terraform init
@@ -206,7 +206,8 @@ jobs:
206206
kayobe overcloud deployment image build --force-rebuild \
207207
-e os_distribution="ubuntu" \
208208
-e os_release="jammy" \
209-
-e ipa_ci_builder_distribution="ubuntu"
209+
-e ipa_ci_builder_distribution="ubuntu" \
210+
-e ipa_ci_builder_release="jammy"
210211
env:
211212
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
212213
if: inputs.ubuntu-jammy
@@ -264,7 +265,8 @@ jobs:
264265
kayobe overcloud deployment image build --force-rebuild \
265266
-e os_distribution="rocky" \
266267
-e os_release="9" \
267-
-e ipa_ci_builder_distribution="rocky"
268+
-e ipa_ci_builder_distribution="rocky" \
269+
-e ipa_ci_builder_release="9"
268270
env:
269271
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
270272
if: inputs.rocky9

etc/kayobe/ansible/pulp-artifact-upload.yml

-31
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,6 @@
142142
retries: 3
143143
delay: 5
144144

145-
- name: Update distribution for latest version
146-
pulp.squeezer.file_distribution:
147-
pulp_url: "{{ remote_pulp_url }}"
148-
username: "{{ remote_pulp_username }}"
149-
password: "{{ remote_pulp_password }}"
150-
name: "{{ repository_name }}_latest"
151-
base_path: "{{ pulp_base_path }}/latest"
152-
publication: "{{ publication_details.publication.pulp_href }}"
153-
content_guard: development
154-
state: present
155-
register: latest_distribution_details
156-
until: latest_distribution_details is success
157-
retries: 3
158-
delay: 5
159-
160145
- name: Create distribution for given version
161146
pulp.squeezer.file_distribution:
162147
pulp_url: "{{ remote_pulp_url }}"
@@ -167,7 +152,6 @@
167152
publication: "{{ publication_details.publication.pulp_href }}"
168153
content_guard: development
169154
state: present
170-
when: latest_distribution_details.changed
171155
register: distribution_result
172156
until: distribution_result is success
173157
retries: 3
@@ -180,26 +164,11 @@
180164
{{ artifact_tag }}/{{ found_files.files[0].path | basename }}"
181165
create: true
182166

183-
- name: Update new artifacts file with latest path
184-
lineinfile:
185-
path: /tmp/updated_artifacts.txt
186-
line: "{{ remote_pulp_url }}/pulp/content/{{ pulp_base_path }}/\
187-
latest/{{ found_files.files[0].path | basename }}"
188-
when: latest_distribution_details.changed
189-
190167
- name: Print versioned path
191168
debug:
192169
msg: "New versioned path: {{ remote_pulp_url }}/pulp/content/{{ pulp_base_path }}/\
193170
{{ artifact_tag }}/{{ found_files.files[0].path | basename }}"
194-
when: latest_distribution_details.changed
195-
196-
- name: Print latest path
197-
debug:
198-
msg: "New latest path: {{ remote_pulp_url }}/pulp/content/{{ pulp_base_path }}/\
199-
latest/{{ found_files.files[0].path | basename }}"
200-
when: latest_distribution_details.changed
201171

202172
- name: Print version tag
203173
debug:
204174
msg: "New tag: {{ artifact_tag }}"
205-
when: latest_distribution_details.changed

etc/kayobe/environments/ci-builder/stackhpc-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ stackhpc_release_pulp_password: "{{ stackhpc_docker_registry_password }}"
101101
ipa_build_images: true
102102
ipa_build_dib_env_extra:
103103
DISTRO_NAME: "{{ ipa_ci_builder_distribution | default('ubuntu') }}"
104+
DIB_RELEASE: "{{ ipa_ci_builder_release | default('jammy') }}"
104105

105106
# Ensure Ark repos are disabled during CI runs, this is due to
106107
# builder being a member of the 'overcloud' group for IPA builds.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
# IPA image versioning tags
3-
stackhpc_rocky_9_ipa_image_version: "2024.1-20241206T160829"
3+
stackhpc_rocky_9_ipa_image_version: "2024.1-20241231T102920"
44
stackhpc_ubuntu_jammy_ipa_image_version: "2024.1-20241206T160829"

0 commit comments

Comments
 (0)