James E. Blair e8af18c387 Switch to new rax flex project for image uploads
This new application credential is in our new project, and so is
the new swift container.

Also, move more information into the secret so everything is
self-contained so it's easy for us to add more locations later.

Drop the user_domain_name because that does not seem to be necessary
with application credentials.

Change-Id: I1bf4a616777a594dffadf4016692446b23ab2976
2025-03-03 10:40:56 -08:00

22 lines
879 B
YAML

- name: Compress image
when: "upload_image_format in ['raw', 'vhd']"
command: zstd '{{ build_diskimage_image_root }}/{{ build_diskimage_image_name }}.{{ upload_image_format }}'
- name: Set extension
when: "upload_image_format in ['raw', 'vhd']"
set_fact:
upload_image_extension: '{{ upload_image_format }}.zst'
- name: Set extension
when: "upload_image_format not in ['raw', 'vhd']"
set_fact:
upload_image_extension: '{{ upload_image_format }}'
- name: Upload image
no_log: true
include_role:
name: image-upload-swift
vars:
cloud: '{{ image_upload_secret.cloud }}'
container: '{{ image_upload_secret.container }}'
filename: '{{ build_diskimage_image_root }}/{{ build_diskimage_image_name }}.{{ upload_image_extension }}'
name: '{{ zuul.build }}-{{ build_diskimage_image_name }}.{{ upload_image_extension }}'
delete_after: 259200