Skip to content

Commit

Permalink
wip: use temp workflows for e2e
Browse files Browse the repository at this point in the history
run the e2e on the fork

Signed-off-by: Magnus Kulke <[email protected]>
  • Loading branch information
mkulke committed Dec 17, 2024
1 parent c19898a commit 5dd8dc1
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 54 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/e2e-mgns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: e2e tests

on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- mkulke/add-scratch-space-for-sandbox

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
e2e:
uses: ./.github/workflows/e2e_run_all.yaml
with:
caa_image_tag: ci-pr${{ github.event.number }}
git_ref: ${{ github.sha }}
podvm_image_tag: ci-pr${{ github.event.number }}
registry: ghcr.io/${{ github.event.pull_request.head.repo.owner.login }}/confidential-containers
secrets: inherit
99 changes: 50 additions & 49 deletions .github/workflows/e2e_run_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ jobs:
debug: true
secrets: inherit

podvm_mkosi_s390x:
uses: ./.github/workflows/podvm_mkosi.yaml
with:
registry: ${{ inputs.registry }}
image_tag: ${{ inputs.podvm_image_tag }}
git_ref: ${{ inputs.git_ref }}
arch: s390x
debug: true
secrets: inherit
# podvm_mkosi_s390x:
# uses: ./.github/workflows/podvm_mkosi.yaml
# with:
# registry: ${{ inputs.registry }}
# image_tag: ${{ inputs.podvm_image_tag }}
# git_ref: ${{ inputs.git_ref }}
# arch: s390x
# debug: true
# secrets: inherit

# Build and push the cloud-api-adaptor image
#
Expand Down Expand Up @@ -177,10 +177,11 @@ jobs:
# Run libvirt e2e tests if pull request labeled 'test_e2e_libvirt'
libvirt:
name: libvirt
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt')
# if: |
# github.event_name == 'schedule' ||
# github.event_name == 'workflow_dispatch' ||
# github.event.name == 'pull_request' ||
# contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt')
needs: [podvm, image, prep_install]
strategy:
fail-fast: false
Expand All @@ -206,17 +207,17 @@ jobs:
git_ref: ${{ inputs.git_ref }}
secrets: inherit

caa_image_s390x:
uses: ./.github/workflows/caa_build_and_push.yaml
with:
registry: ${{ inputs.registry }}
dev_arches: 'linux/s390x'
release_arches: 'linux/s390x'
dev_tags: ${{ inputs.caa_image_tag }}-s390x-dev
release_tags: ${{ inputs.caa_image_tag }}-s390x
git_ref: ${{ inputs.git_ref }}
runner: 's390x'
secrets: inherit
# caa_image_s390x:
# uses: ./.github/workflows/caa_build_and_push.yaml
# with:
# registry: ${{ inputs.registry }}
# dev_arches: 'linux/s390x'
# release_arches: 'linux/s390x'
# dev_tags: ${{ inputs.caa_image_tag }}-s390x-dev
# release_tags: ${{ inputs.caa_image_tag }}-s390x
# git_ref: ${{ inputs.git_ref }}
# runner: 's390x'
# secrets: inherit

libvirt_e2e_arch_prep:
runs-on: ubuntu-24.04
Expand All @@ -243,11 +244,11 @@ jobs:
# Run libvirt amd64 e2e tests, based on the mkosi image, if pull request labeled 'test_e2e_libvirt'
libvirt_amd64:
name: E2E tests on libvirt for the amd64 architecture
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_amd64')
# if: |
# github.event_name == 'schedule' ||
# github.event_name == 'workflow_dispatch' ||
# contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
# contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_amd64')
needs: [podvm_mkosi_amd64, libvirt_e2e_arch_prep, caa_image_amd64]
strategy:
fail-fast: false
Expand All @@ -263,23 +264,23 @@ jobs:
secrets: inherit

# Run libvirt s390x e2e tests, based on the mkosi image, if pull request labeled 'test_e2e_libvirt'
libvirt_s390x:
name: E2E tests on libvirt for the s390x architecture
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_s390x')
needs: [podvm_mkosi_s390x, libvirt_e2e_arch_prep, caa_image_s390x]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.libvirt_e2e_arch_prep.outputs.matrix) }}
uses: ./.github/workflows/e2e_libvirt.yaml
with:
runner: s390x-large
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-s390x-dev
podvm_image: ${{ needs.podvm_mkosi_s390x.outputs.qcow2_oras_image }}
install_directory_artifact: install_directory
git_ref: ${{ inputs.git_ref }}
oras: true
secrets: inherit
# libvirt_s390x:
# name: E2E tests on libvirt for the s390x architecture
# if: |
# github.event_name == 'schedule' ||
# github.event_name == 'workflow_dispatch' ||
# contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
# contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_s390x')
# needs: [podvm_mkosi_s390x, libvirt_e2e_arch_prep, caa_image_s390x]
# strategy:
# fail-fast: false
# matrix: ${{ fromJSON(needs.libvirt_e2e_arch_prep.outputs.matrix) }}
# uses: ./.github/workflows/e2e_libvirt.yaml
# with:
# runner: s390x-large
# caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-s390x-dev
# podvm_image: ${{ needs.podvm_mkosi_s390x.outputs.qcow2_oras_image }}
# install_directory_artifact: install_directory
# git_ref: ${{ inputs.git_ref }}
# oras: true
# secrets: inherit
12 changes: 7 additions & 5 deletions .github/workflows/podvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ jobs:
matrix:
os:
- ubuntu
arch: [amd64, s390x]
provider: [generic, vsphere]
arch: [amd64]
# arch: [amd64, s390x]
provider: [generic]
# provider: [generic, vsphere]
include:
- os: ubuntu
exclude:
- provider: vsphere
arch: s390x
# exclude:
# - provider: vsphere
# arch: s390x
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand Down

0 comments on commit 5dd8dc1

Please sign in to comment.