Skip to content

test upload images commit #10

test upload images commit

test upload images commit #10

name: Upload release images to client sites from s3
on:
workflow_dispatch:
push:
branches:
- main
- master
- feat/fatimage-auto-upload
jobs:
image_upload:
runs-on: ubuntu-22.04
concurrency: ${{ github.ref }}
env:
OS_CLOUD: openstack
CI_CLOUD: ${{ vars.CI_CLOUD }}
steps:
- uses: actions/checkout@v2
- name: Record which cloud CI is running on
run: |
echo CI_CLOUD: ${{ vars.CI_CLOUD }}
- name: Write clouds.yaml
run: |
mkdir -p ~/.config/openstack/
echo "${{ secrets[format('{0}_CLOUDS_YAML', vars.CI_CLOUD)] }}" > ~/.config/openstack/clouds.yaml
shell: bash
- name: Write s3cmd configuration
run: |
cat <<EOF > ~/.s3cfg
access_key =
secret_key =
host_base = object.arcus.openstack.hpc.cam.ac.uk/swift/v1/AUTH_3a06571936a0424bb40bc5c672c4ccb1
host_bucket = %(bucket)s.object.arcus.openstack.hpc.cam.ac.uk/swift/v1/AUTH_3a06571936a0424bb40bc5c672c4ccb1
use_https = True
signature_v2 = True
EOF
shell: bash
- name: Install s3cmd
run: |
sudo apt-get --yes install s3cmd
- name: Upload latest image if missing
run: |
/usr/bin/python3.10 -m venv venv
. venv/bin/activate
pip install -U pip
pip install -r requirements.txt
ansible --version
. environments/.stackhpc/activate
ansible-galaxy collection install openstack.cloud
. .github/bin/get-s3-image.sh -o