Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/stackhpc-check-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ jobs:
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh \
'$KAYOBE_CONFIG_PATH/ansible/tools/check-tags.yml'
'$KAYOBE_CONFIG_PATH/ansible/tools/check-tags.yml' -vvvvv
74 changes: 12 additions & 62 deletions etc/kayobe/ansible/pulp/pulp-artifact-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@
- urllib3
state: present

- name: Upload an artifact
pulp.squeezer.artifact:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
file: "{{ found_files.files[0].path }}"
state: present
register: upload_result
until: upload_result is success
retries: 3
delay: 60

- name: Get sha256 hash
ansible.builtin.stat:
path: "{{ found_files.files[0].path }}"
Expand All @@ -58,87 +46,49 @@
checksum_algorithm: sha256
register: checksum_stats

- name: Upload checksum artifact
pulp.squeezer.artifact:
- name: Ensure file repo exists
pulp.squeezer.file_repository:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
file: "/tmp/{{ found_files.files[0].path | basename }}.sha256"
name: "{{ repository_name }}"
state: present
register: checksum_upload_result
until: checksum_upload_result is success
register: file_repo_result
until: file_repo_result is success
retries: 3
delay: 60
when: upload_checksum
delay: 5

- name: Create file content from artifact
- name: Upload artifact
pulp.squeezer.file_content:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
file: "{{ found_files.files[0].path }}"
sha256: "{{ file_stats.stat.checksum }}"
relative_path: "{{ found_files.files[0].path | basename }}"
state: present
repository: "{{ repository_name }}"
register: file_content_result
until: file_content_result is success
retries: 3
delay: 5

- name: Create checksum content from artifact
- name: Upload checksum
pulp.squeezer.file_content:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
file: "/tmp/{{ found_files.files[0].path | basename }}.sha256"
sha256: "{{ checksum_stats.stat.checksum }}"
relative_path: "{{ found_files.files[0].path | basename }}.sha256"
state: present
repository: "{{ repository_name }}"
register: checksum_content_result
until: checksum_content_result is success
retries: 3
delay: 5
when: upload_checksum

- name: Ensure file repo exists
pulp.squeezer.file_repository:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
name: "{{ repository_name }}"
state: present
register: file_repo_result
until: file_repo_result is success
retries: 3
delay: 5

- name: Add content to file repo
pulp.squeezer.file_repository_content:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
repository: "{{ repository_name }}"
present_content:
- relative_path: "{{ found_files.files[0].path | basename }}"
sha256: "{{ file_stats.stat.checksum }}"
register: file_repo_content_result
until: file_repo_content_result is success
retries: 3
delay: 5

- name: Add checksum content to file repo
pulp.squeezer.file_repository_content:
pulp_url: "{{ remote_pulp_url }}"
username: "{{ remote_pulp_username }}"
password: "{{ remote_pulp_password }}"
repository: "{{ repository_name }}"
present_content:
- relative_path: "{{ found_files.files[0].path | basename }}.sha256"
sha256: "{{ checksum_stats.stat.checksum }}"
register: checksum_repo_content_result
until: checksum_repo_content_result is success
retries: 3
delay: 5
when: upload_checksum

- name: Create a new publication to point to this version
pulp.squeezer.file_publication:
pulp_url: "{{ remote_pulp_url }}"
Expand Down
8 changes: 4 additions & 4 deletions etc/kayobe/ansible/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
collections:
- name: stackhpc.cephadm
version: 1.22.0
# NOTE: Pinning pulp.squeezer to 0.0.13 because 0.0.14+ depends on the
# pulp_glue Python library being installed.
- name: pulp.squeezer
version: 0.0.13
version: 0.2.3
- name: stackhpc.pulp
version: 0.5.5
version: fix-ci
type: git
source: https://github.com/stackhpc/ansible-collection-pulp
- name: stackhpc.hashicorp
version: 2.7.1
- name: stackhpc.kayobe_workflows
Expand Down
1 change: 1 addition & 0 deletions etc/kayobe/kolla-image-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Dict of Kolla image tags to deploy for each service.
# Each key is the tag variable prefix name, and the value is another dict,
# where the key is the OS distro and the value is the tag to deploy.
# Foo test ci
kolla_image_tags:
openstack:
rocky-9: 2025.1-rocky-9-20250730T105631
Expand Down
Loading