Skip to content

Commit

Permalink
test syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianriobo committed Jan 9, 2024
1 parent 0ba704b commit 22cc420
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 58 deletions.
131 changes: 78 additions & 53 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
OCI_E2E_NAME: libhvee-e2e
CORRELATE: ${{ github.sha }}

jobs:
build-oci-e2e:
Expand All @@ -22,13 +23,13 @@ jobs:
- name: Build and archive e2e image
# use github.sha as ID to correlate various workflows triggered by the same event
run: |
VERSION=${{ github.sha }} make build-oci-e2e
podman save -o ${{ env.OCI_E2E_NAME }}.tar quay.io/rhqp/${{ env.OCI_E2E_NAME}}:v${{ github.sha }}
VERSION=${{ env.CORRELATE }} make build-oci-e2e
podman save -o ${{ env.OCI_E2E_NAME }}.tar quay.io/rhqp/${{ env.OCI_E2E_NAME}}:v${{ env.CORRELATE }}
- name: Upload e2e flat image as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.OCI_E2E_NAME }}-v${{ github.sha }}
name: ${{ env.OCI_E2E_NAME }}-v${{ env.CORRELATE }}
path: ${{ env.OCI_E2E_NAME }}.tar

build-executables:
Expand All @@ -51,7 +52,7 @@ jobs:
- name: Upload libhvee executables as artifact
uses: actions/upload-artifact@v3
with:
name: libhvee-v${{ github.sha }}
name: libhvee-v${{ env.CORRELATE }}
path: bin/*.exe

e2e-windows-destkop:
Expand All @@ -75,55 +76,79 @@ jobs:
steps:
# When moving to be executed on upstream we need to save the context
# to try match the ${{ github.sha }} or some other correlation value
- name: Create instance
run: |
# Create instance
podman run -d --name windows-create --rm \
-v ${PWD}:/workspace:z \
-e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \
-e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \
-e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \
-e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \
-e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \
-e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \
quay.io/rhqp/qenvs:v0.6.1 azure \
windows create \
--project-name 'windows-desktop' \
--backed-url azblob://qenvs-state/${{ github.sha }} \
--conn-details-output '/workspace' \
--windows-version '${{ matrix.windows-version }}' \
--windows-featurepack '${{ matrix.windows-featurepack }}' \
--tags org=containers,project=libhvee,origin=ghaction \
--spot
# Check logs
podman logs -f windows-create
- name: Check instance system info
run: |
ssh -i id_rsa \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-o ServerAliveInterval=30 \
-o ServerAliveCountMax=1200 \
$(cat username)@$(cat host) "systeminfo"
- name: Destroy instance
if: always()
# - name: Create instance
# run: |
# # Create instance
# podman run -d --name windows-create --rm \
# -v ${PWD}:/workspace:z \
# -e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \
# -e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \
# -e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \
# -e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \
# -e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \
# -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \
# quay.io/rhqp/qenvs:v0.6.1 azure \
# windows create \
# --project-name 'windows-desktop' \
# --backed-url azblob://qenvs-state/${{ github.sha }} \
# --conn-details-output '/workspace' \
# --windows-version '${{ matrix.windows-version }}' \
# --windows-featurepack '${{ matrix.windows-featurepack }}' \
# --tags org=containers,project=libhvee,origin=ghaction \
# --spot
# # Check logs
# podman logs -f windows-create

# - name: Check instance system info
# run: |
# ssh -i id_rsa \
# -o StrictHostKeyChecking=no \
# -o UserKnownHostsFile=/dev/null \
# -o ServerAliveInterval=30 \
# -o ServerAliveCountMax=1200 \
# $(cat username)@$(cat host) "systeminfo"

- name: Download e2e flat image as artifact
id: download-libhvee-e2e
uses: dawidd6/action-download-artifact@v3
with:
name: libhvee-e2e-v${{ env.CORRELATE }}
# workflow: all.yml
# workflow_conclusion: ""

- name: Download libhvee executables
id: download-libhvee
uses: dawidd6/action-download-artifact@v3
with:
path: .
name: libhvee-v${{ env.CORRELATE }}
# workflow: all.yml
# workflow_conclusion: ""

- name: Run libhvee e2e
run: |
# Destroy instance
podman run -d --name windows-destroy --rm \
-v ${PWD}:/workspace:z \
-e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \
-e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \
-e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \
-e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \
-e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \
-e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \
quay.io/rhqp/qenvs:v0.6.1 azure \
windows destroy \
--project-name 'windows-desktop' \
--backed-url azblob://qenvs-state/${{ github.sha }}
# Check logs
podman logs -f windows-destroy
# load libhvee-e2e image from tar file
# podman load -i libhvee-e2e.tar
ls
# podman images
# - name: Destroy instance
# if: always()
# run: |
# # Destroy instance
# podman run -d --name windows-destroy --rm \
# -v ${PWD}:/workspace:z \
# -e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \
# -e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \
# -e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \
# -e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \
# -e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \
# -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \
# quay.io/rhqp/qenvs:v0.6.1 azure \
# windows destroy \
# --project-name 'windows-desktop' \
# --backed-url azblob://qenvs-state/${{ github.sha }}
# # Check logs
# podman logs -f windows-destroy


10 changes: 5 additions & 5 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: builder

on:
push:
branches:
- "main"
pull_request: {}
# on:
# push:
# branches:
# - "main"
# pull_request: {}

env:
OCI_E2E_NAME: libhvee-e2e
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ jobs:
-o ServerAliveCountMax=1200 \
$(cat username)@$(cat host) "systeminfo"
- name: Download e2e flat image as artifact
id: download-images-artifact
uses: dawidd6/action-download-artifact@v3
with:
# workflow_conclusion: completed
# workflow: build-tests.yml
name: libhvee-e2e-v${{ github.sha }}

- name: Run libhvee e2e
run: |
# load libhvee-e2e image from tar file
podman load -i libhvee-e2e.tar
- name: Destroy instance
if: always()
run: |
Expand Down

0 comments on commit 22cc420

Please sign in to comment.