Skip to content

Commit b98d803

Browse files
committed
test new fatimage build on SMS
1 parent d16ef50 commit b98d803

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

.github/workflows/fatimage.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
- LEAFCLOUD
1111
- SMS
1212
- ARCUS
13-
schedule:
14-
- cron: '0 0 * * *' # Run at midnight
1513

1614
jobs:
1715
openstack:
@@ -27,16 +25,16 @@ jobs:
2725
- RL8
2826
- RL9
2927
build:
30-
- openstack.rocky-latest
31-
- openstack.rocky-latest-cuda
28+
- openstack.openhpc
29+
- openstack.openhpc-cuda
3230
exclude:
3331
- os_version: RL8
34-
build: openstack.rocky-latest-cuda
32+
build: openstack.openhpc-cuda
3533

3634
env:
3735
ANSIBLE_FORCE_COLOR: True
3836
OS_CLOUD: openstack
39-
CI_CLOUD: ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
37+
CI_CLOUD: ${{ github.event.inputs.ci_cloud }}
4038
steps:
4139
- uses: actions/checkout@v2
4240

@@ -79,12 +77,18 @@ jobs:
7977
cd packer/
8078
packer init .
8179
80+
if [[ "${{ matrix.build }}" == *"cuda"* ]]; then
81+
SOURCE_IMAGE_NAME="rocky-latest-cuda"
82+
else
83+
SOURCE_IMAGE_NAME="rocky-latest"
84+
fi
85+
8286
PACKER_LOG=1 packer build \
8387
-on-error=${{ vars.PACKER_ON_ERROR }} \
8488
-only=${{ matrix.build }} \
8589
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
90+
-var "source_image_name={\"${{ matrix.os_version }}\":\"${SOURCE_IMAGE_NAME}-${{ matrix.os_version }}\"}" \
8691
openstack.pkr.hcl
87-
8892
env:
8993
PKR_VAR_os_version: ${{ matrix.os_version }}
9094

@@ -100,23 +104,11 @@ jobs:
100104
echo "image-name=${IMAGE_NAME}" >> "$GITHUB_OUTPUT"
101105
echo "image-id=$IMAGE_ID" >> "$GITHUB_OUTPUT"
102106
103-
- name: Delete old latest image
104-
run: |
105-
. venv/bin/activate
106-
IMAGE_COUNT=$(openstack image list --name ${{ steps.manifest.outputs.image-name }} -f value -c ID | wc -l)
107-
if [ "$IMAGE_COUNT" -gt 1 ]; then
108-
OLD_IMAGE_ID=$(openstack image list --sort created_at:asc --name "${{ steps.manifest.outputs.image-name }}" -f value -c ID | head -n 1)
109-
openstack image delete "$OLD_IMAGE_ID"
110-
else
111-
echo "Only one image exists, skipping deletion."
112-
fi
113-
114107
- name: Download image
115108
run: |
116109
. venv/bin/activate
117110
sudo mkdir /mnt/images
118111
sudo chmod 777 /mnt/images
119-
openstack image unset --property signature_verified "${{ steps.manifest.outputs.image-name }}"
120112
openstack image save --file /mnt/images/${{ steps.manifest.outputs.image-name }}.qcow2 ${{ steps.manifest.outputs.image-name }}
121113
122114
- name: Set up QEMU

0 commit comments

Comments
 (0)