Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable latest path for Pulp artifacts #1439

Merged
merged 5 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ipa-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
pip install -r ../src/kayobe-config/requirements.txt

- name: Install terraform
uses: hashicorp/setup-terraform@v3
uses: hashicorp/setup-terraform@v2

- name: Initialise terraform
run: terraform init
Expand Down Expand Up @@ -206,7 +206,8 @@ jobs:
kayobe overcloud deployment image build --force-rebuild \
-e os_distribution="ubuntu" \
-e os_release="jammy" \
-e ipa_ci_builder_distribution="ubuntu"
-e ipa_ci_builder_distribution="ubuntu" \
-e ipa_ci_builder_release="jammy"
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
if: inputs.ubuntu-jammy
Expand Down Expand Up @@ -264,7 +265,8 @@ jobs:
kayobe overcloud deployment image build --force-rebuild \
-e os_distribution="rocky" \
-e os_release="9" \
-e ipa_ci_builder_distribution="rocky"
-e ipa_ci_builder_distribution="rocky" \
-e ipa_ci_builder_release="9"
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
if: inputs.rocky9
Expand Down
31 changes: 0 additions & 31 deletions etc/kayobe/ansible/pulp-artifact-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,6 @@
retries: 3
delay: 5

- name: Update distribution for latest version
pulp.squeezer.file_distribution:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
name: "{{ repository_name }}_latest"
base_path: "{{ pulp_base_path }}/latest"
publication: "{{ publication_details.publication.pulp_href }}"
content_guard: development
state: present
register: latest_distribution_details
until: latest_distribution_details is success
retries: 3
delay: 5

- name: Create distribution for given version
pulp.squeezer.file_distribution:
pulp_url: "{{ remote_pulp_url }}"
Expand All @@ -167,7 +152,6 @@
publication: "{{ publication_details.publication.pulp_href }}"
content_guard: development
state: present
when: latest_distribution_details.changed
register: distribution_result
until: distribution_result is success
retries: 3
Expand All @@ -180,26 +164,11 @@
{{ artifact_tag }}/{{ found_files.files[0].path | basename }}"
create: true

- name: Update new artifacts file with latest path
lineinfile:
path: /tmp/updated_artifacts.txt
line: "{{ remote_pulp_url }}/pulp/content/{{ pulp_base_path }}/\
latest/{{ found_files.files[0].path | basename }}"
when: latest_distribution_details.changed

- name: Print versioned path
debug:
msg: "New versioned path: {{ remote_pulp_url }}/pulp/content/{{ pulp_base_path }}/\
{{ artifact_tag }}/{{ found_files.files[0].path | basename }}"
when: latest_distribution_details.changed

- name: Print latest path
debug:
msg: "New latest path: {{ remote_pulp_url }}/pulp/content/{{ pulp_base_path }}/\
latest/{{ found_files.files[0].path | basename }}"
when: latest_distribution_details.changed

- name: Print version tag
debug:
msg: "New tag: {{ artifact_tag }}"
when: latest_distribution_details.changed
1 change: 1 addition & 0 deletions etc/kayobe/environments/ci-builder/stackhpc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ stackhpc_release_pulp_password: "{{ stackhpc_docker_registry_password }}"
ipa_build_images: true
ipa_build_dib_env_extra:
DISTRO_NAME: "{{ ipa_ci_builder_distribution | default('ubuntu') }}"
DIB_RELEASE: "{{ ipa_ci_builder_release | default('jammy') }}"

# Ensure Ark repos are disabled during CI runs, this is due to
# builder being a member of the 'overcloud' group for IPA builds.
Expand Down
2 changes: 1 addition & 1 deletion etc/kayobe/pulp-ipa-image-versions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
# IPA image versioning tags
stackhpc_rocky_9_ipa_image_version: "2024.1-20241206T160829"
stackhpc_rocky_9_ipa_image_version: "2024.1-20241231T102920"
stackhpc_ubuntu_jammy_ipa_image_version: "2024.1-20241206T160829"