Skip to content

Commit b30a24c

Browse files
committed
testing nightly update
1 parent 0aec76c commit b30a24c

File tree

2 files changed

+16
-90
lines changed

2 files changed

+16
-90
lines changed

.github/workflows/fatimage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
build:
2525
- image_name: openhpc-RL8
2626
source_image_name: Rocky-8-GenericCloud-Base-8.10-20240528.0.x86_64.qcow2
27-
inventory_groups: control,compute,login,update
27+
inventory_groups: control,compute,login
2828
- image_name: openhpc-RL9
2929
source_image_name: Rocky-9-GenericCloud-Base-9.5-20241118.0.x86_64.qcow2
30-
inventory_groups: control,compute,login,update
30+
inventory_groups: control,compute,login
3131
env:
3232
ANSIBLE_FORCE_COLOR: True
3333
OS_CLOUD: openstack

.github/workflows/nightlybuild.yml

Lines changed: 14 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
fail-fast: false # allow other matrix jobs to continue even if one fails
2525
matrix: # build RL8, RL9
2626
build:
27-
- image_name: rocky-latest-RL8
27+
- image_name: openhpc-RL8
2828
source_image_name: Rocky-8-GenericCloud-Base-8.10-20240528.0.x86_64.qcow2
2929
inventory_groups: update
30-
- image_name: rocky-latest-RL9
31-
source_image_name: Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
30+
- image_name: openhpc-RL9
31+
source_image_name: Rocky-9-GenericCloud-Base-9.5-20241118.0.x86_64.qcow2
3232
inventory_groups: update
3333
env:
3434
ANSIBLE_FORCE_COLOR: True
3535
OS_CLOUD: openstack
36-
CI_CLOUD: ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
36+
CI_CLOUD: ${{ github.event.inputs.ci_cloud }}
3737
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}
3838
LEAFCLOUD_PULP_PASSWORD: ${{ secrets.LEAFCLOUD_PULP_PASSWORD }}
3939

@@ -84,7 +84,6 @@ jobs:
8484
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
8585
-var "source_image_name=${{ matrix.build.source_image_name }}" \
8686
-var "image_name=${{ matrix.build.image_name }}" \
87-
-var "image_name_version=" \
8887
-var "inventory_groups=${{ matrix.build.inventory_groups }}" \
8988
openstack.pkr.hcl
9089
@@ -99,92 +98,19 @@ jobs:
9998
IMAGE_NAME=$(openstack image show -f value -c name $IMAGE_ID)
10099
echo "image-name=${IMAGE_NAME}" >> "$GITHUB_OUTPUT"
101100
echo "image-id=$IMAGE_ID" >> "$GITHUB_OUTPUT"
101+
echo $IMAGE_ID > image-id.txt
102+
echo $IMAGE_NAME > image-name.txt
102103
103104
- name: Make image usable for further builds
104105
run: |
105106
. venv/bin/activate
106107
openstack image unset --property signature_verified "${{ steps.manifest.outputs.image-id }}"
107108
108-
- name: Delete old latest image
109-
run: |
110-
. venv/bin/activate
111-
IMAGE_COUNT=$(openstack image list --name ${{ steps.manifest.outputs.image-name }} -f value -c ID | wc -l)
112-
if [ "$IMAGE_COUNT" -gt 1 ]; then
113-
OLD_IMAGE_ID=$(openstack image list --sort created_at:asc --name "${{ steps.manifest.outputs.image-name }}" -f value -c ID | head -n 1)
114-
echo "Deleting old image ID: $OLD_IMAGE_ID"
115-
openstack image delete "$OLD_IMAGE_ID"
116-
else
117-
echo "Only one image exists, skipping deletion."
118-
fi
119-
120-
upload:
121-
name: upload-nightly-targets
122-
needs: openstack
123-
concurrency:
124-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.image_name }}-${{ matrix.target_cloud }}
125-
cancel-in-progress: true
126-
runs-on: ubuntu-22.04
127-
strategy:
128-
fail-fast: false
129-
matrix:
130-
target_cloud:
131-
- LEAFCLOUD
132-
- SMS
133-
- ARCUS
134-
build:
135-
- image_name: rocky-latest-RL8
136-
- image_name: rocky-latest-RL9
137-
exclude:
138-
- target_cloud: LEAFCLOUD
139-
env:
140-
OS_CLOUD: openstack
141-
SOURCE_CLOUD: ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
142-
TARGET_CLOUD: ${{ matrix.target_cloud }}
143-
steps:
144-
- uses: actions/checkout@v2
145-
146-
- name: Record settings for CI cloud
147-
run: |
148-
echo SOURCE_CLOUD: ${{ env.SOURCE_CLOUD }}
149-
echo TARGET_CLOUD: ${{ env.TARGET_CLOUD }}
150-
151-
- name: Install openstackclient
152-
run: |
153-
python3 -m venv venv
154-
. venv/bin/activate
155-
pip install -U pip
156-
pip install $(grep -o 'python-openstackclient[><=0-9\.]*' requirements.txt)
157-
158-
- name: Write clouds.yaml
159-
run: |
160-
mkdir -p ~/.config/openstack/
161-
echo "${{ secrets[format('{0}_CLOUDS_YAML', env.SOURCE_CLOUD)] }}" > ~/.config/openstack/source_clouds.yaml
162-
echo "${{ secrets[format('{0}_CLOUDS_YAML', env.TARGET_CLOUD)] }}" > ~/.config/openstack/target_clouds.yaml
163-
164-
- name: Download source image
165-
run: |
166-
. venv/bin/activate
167-
export OS_CLIENT_CONFIG_FILE=~/.config/openstack/source_clouds.yaml
168-
openstack image save --file ${{ matrix.build.image_name }} ${{ matrix.build.image_name }}
169-
170-
- name: Upload to target cloud
171-
run: |
172-
. venv/bin/activate
173-
export OS_CLIENT_CONFIG_FILE=~/.config/openstack/target_clouds.yaml
174-
175-
openstack image create "${{ matrix.build.image_name }}" \
176-
--file "${{ matrix.build.image_name }}" \
177-
--disk-format qcow2 \
178-
179-
- name: Delete old latest image from target cloud
180-
run: |
181-
. venv/bin/activate
182-
export OS_CLIENT_CONFIG_FILE=~/.config/openstack/target_clouds.yaml
183-
184-
IMAGE_COUNT=$(openstack image list --name ${{ matrix.build.image_name }} -f value -c ID | wc -l)
185-
if [ "$IMAGE_COUNT" -gt 1 ]; then
186-
OLD_IMAGE_ID=$(openstack image list --sort created_at:asc --name "${{ matrix.build.image_name }}" -f value -c ID | head -n 1)
187-
openstack image delete "$OLD_IMAGE_ID"
188-
else
189-
echo "Only one image exists, skipping deletion."
190-
fi
109+
- name: Upload manifest artifact
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: image-details-${{ matrix.build.image_name }}
113+
path: |
114+
./image-id.txt
115+
./image-name.txt
116+
overwrite: true

0 commit comments

Comments
 (0)