Skip to content

Commit

Permalink
s/image/artifact/g
Browse files Browse the repository at this point in the history
  • Loading branch information
assumptionsandg committed Dec 3, 2024
1 parent b993c1a commit 24f08f0
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions etc/kayobe/ansible/pulp-image-upload.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
- name: Upload and create a distribution for an image
- name: Upload and create a distribution for an artifact
hosts: seed
vars:
remote_pulp_url: "{{ stackhpc_release_pulp_url }}"
remote_pulp_username: "{{ stackhpc_image_repository_username }}"
remote_pulp_password: "{{ stackhpc_image_repository_password }}"
repository_name: "{{ image_name }}-{{ openstack_release }}-{{ os_distribution }}-{{ os_release }}"
pulp_base_path: "{{ image_name }}/{{ openstack_release }}/{{ os_distribution }}/{{ os_release }}"
repository_name: "{{ artifact_path }}-{{ openstack_release }}-{{ os_distribution }}-{{ os_release }}"
pulp_base_path: "{{ artifact_path }}/{{ openstack_release }}/{{ os_distribution }}/{{ os_release }}"
file_extension: 'qcow2'
tasks:
- name: Print image tag
- name: Print artifact tag
debug:
msg: "Image tag: {{ image_tag }}"
msg: "artifact tag: {{ artifact_tag }}"

- name: Get filename
find:
paths: "{{ image_path }}"
paths: "{{ artifact_path }}"
patterns: "*.{{ file_extension }}"
register: found_files

Expand Down Expand Up @@ -108,8 +108,8 @@
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
name: "{{ repository_name }}_{{ image_tag }}"
base_path: "{{ pulp_base_path }}/{{ image_tag }}"
name: "{{ repository_name }}_{{ artifact_tag }}"
base_path: "{{ pulp_base_path }}/{{ artifact_tag }}"
publication: "{{ publication_details.publication.pulp_href }}"
content_guard: development
state: present
Expand All @@ -119,24 +119,24 @@
retries: 3
delay: 5

- name: Update new images file with versioned path
- name: Update new artifacts file with versioned path
lineinfile:
path: /tmp/updated_images.txt
path: /tmp/updated_artifacts.txt
line: "{{ remote_pulp_url }}/pulp/content/{{ pulp_base_path }}/\
{{ image_tag }}/{{ found_files.files[0].path | basename }}"
{{ artifact_tag }}/{{ found_files.files[0].path | basename }}"
create: true

- name: Update new images file with latest path
- name: Update new artifacts file with latest path
lineinfile:
path: /tmp/updated_images.txt
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 }}/\
{{ image_tag }}/{{ found_files.files[0].path | basename }}"
{{ artifact_tag }}/{{ found_files.files[0].path | basename }}"
when: latest_distribution_details.changed

- name: Print latest path
Expand All @@ -147,5 +147,5 @@

- name: Print version tag
debug:
msg: "New tag: {{ image_tag }}"
msg: "New tag: {{ artifact_tag }}"
when: latest_distribution_details.changed

0 comments on commit 24f08f0

Please sign in to comment.