Skip to content

fix: correct list override for exemplars #341

fix: correct list override for exemplars

fix: correct list override for exemplars #341

name: Running hyperconverged smoke tests
on:
workflow_dispatch:
inputs:
acmeEmail:
description: Set email for ACME
required: true
default: "[email protected]"
type: string
gatewayDomain:
description: Set domain for the gateway
required: true
default: cloud.local
type: string
osImage:
description: Set OS image
required: true
default: "Ubuntu 24.04"
type: choice
options:
- "Ubuntu 24.04"
- "Ubuntu 22.04"
- "Debian 12"
sshUsername:
description: Set SSH username
required: true
default: "ubuntu"
type: choice
options:
- "ubuntu"
- "debian"
mode:
description: Set mode
required: true
default: "test"
type: choice
options:
- "test"
- "deploy"
- "cleanup"
pull_request:
paths:
- ansible/**
- base-kustomize/**
- base-helm-configs/**
- bin/**
- scripts/**
- ".github/workflows/smoke-deploy-lab.yaml"
env:
HYPERCONVERGED_DEV: "true"
GATEWAY_DOMAIN: cloud.local
ACME_EMAIL: [email protected]
OS_IMAGE: "Ubuntu 24.04"
SSH_USERNAME: "ubuntu"
jobs:
smoke-deploy:
runs-on: self-hosted
container:
image: localhost:5000/genestack-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Dynamically set MY_DATE environment variable
if: ${{ github.event_name == 'pull_request' }}
run: echo "LAB_NAME_PREFIX=smoke-$(date +%s)" >> $GITHUB_ENV
- name: Statically set environment variable
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "LAB_NAME_PREFIX=$(echo '${{ github.event.inputs.gatewayDomain }}' | tr '.' '-')" >> $GITHUB_ENV
echo "GATEWAY_DOMAIN=${{ github.event.inputs.gatewayDomain }}" >> $GITHUB_ENV
echo "ACME_EMAIL=${{ github.event.inputs.acmeEmail }}" >> $GITHUB_ENV
echo "OS_IMAGE=${{ github.event.inputs.osImage }}" >> $GITHUB_ENV
echo "SSH_USERNAME=${{ github.event.inputs.sshUsername }}" >> $GITHUB_ENV
- name: Run deployment script
if: ${{ github.event_name == 'pull_request' || contains(fromJSON('["deploy", "test"]'), github.event.inputs.mode) }}
run: |
eval "$(ssh-agent -s)"
scripts/hyperconverged-lab.sh
- name: Retrieve Keys
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'deploy' }}
uses: actions/upload-artifact@v4
with:
name: ssh-keys
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
path: "/github/home/.ssh/${{ env.LAB_NAME_PREFIX }}-key.pem"
- name: Create output file in markdown format
run: |
if [ -s /tmp/output.txt ]; then
echo "### Cloud Access" > access-output.txt
cat /tmp/output.txt >> access-output.txt
fi
- name: Publish Output to Summary
run: |
if [ -s access-output.txt ]; then
{
cat access-output.txt
} >> $GITHUB_STEP_SUMMARY
fi
- name: Cleanup the lab
if: ${{ always() && (github.event_name == 'pull_request' || contains(fromJSON('["cleanup", "test"]'), github.event.inputs.mode)) }}
run: scripts/hyperconverged-lab-uninstall.sh