Skip to content

Commit 281493b

Browse files
committed
add safespring store
1 parent 025cb76 commit 281493b

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Store OpenStack CAPI image on safespring
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
description: Kubernetes version
8+
required: true
9+
type: string
10+
tag:
11+
description: ck8s-capi tag
12+
required: true
13+
type: string
14+
15+
env:
16+
version: ${{ inputs.version }}
17+
tag: ${{ inputs.tag }}
18+
19+
20+
jobs:
21+
on-success:
22+
runs-on: ubuntu-24.04
23+
24+
steps:
25+
- name: retrieve image
26+
uses: actions/download-artifact@v5
27+
with:
28+
name: ubuntu-2404-efi-kube-${{ env.version }}-ck8s-capi-${{ env.tag }}
29+
30+
- name: install deps
31+
run: |
32+
sudo apt update && \
33+
sudo apt install -y python3-openstackclient
34+
35+
- name: store image
36+
env:
37+
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.SAFESPRING_APPLICATION_CREDENTIAL_ID }}
38+
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.SAFESPRING_APPLICATION_CREDENTIAL_SECRET }}
39+
OS_AUTH_URL: " https://v2.dashboard.sto1.safedc.net:5000/v3/ "
40+
OS_AUTH_TYPE: "v3applicationcredential"
41+
OS_IDENTITY_API_VERSION: "3"
42+
OS_INTERFACE: "public"
43+
OS_REGION_NAME: "sto1"
44+
run: |
45+
46+
image_create_extra_vars+=('--property' 'hw_firmware_type=uefi' '--property' 'hw_disk_bus=scsi' '--property' 'hw_scsi_model=virtio-scsi')
47+
image_name=ubuntu-2404-efi-kube-${{ env.version }}-ck8s-capi-${{ env.tag }}
48+
image_path=./ubuntu-2404-efi-kube-${{ env.version }}-ck8s-capi-${{ env.tag }}
49+
50+
openstack image create --disk-format qcow2 "${image_create_extra_vars[@]}" --file "${image_path}" --shared --progress "${image_name}"
51+

0 commit comments

Comments
 (0)