diff --git a/.github/workflows/e2e-mgns.yaml b/.github/workflows/e2e-mgns.yaml new file mode 100644 index 000000000..f11773909 --- /dev/null +++ b/.github/workflows/e2e-mgns.yaml @@ -0,0 +1,77 @@ +name: mgns 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 + if: false + 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 + + docker: + runs-on: ubuntu-24.04 + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v4 + + - name: Setup libvirt + working-directory: src/cloud-api-adaptor + run: libvirt/config_libvirt.sh + + - name: Create cluster + working-directory: src/cloud-api-adaptor + run: libvirt/kcli_cluster.sh create + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + detached: true + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: network=host + + - name: Create Dockerfile + run: | + mkdir docker-test + cd docker-test + touch ohai + cat < Dockerfile + FROM scratch + COPY ohai / + EOF + + - name: Build and push to local registry + uses: docker/build-push-action@v6 + with: + push: true + tags: localhost:5000/name/app:latest + context: ./docker-test + + - name: Inspect + run: | + docker buildx imagetools inspect localhost:5000/name/app:latest diff --git a/.github/workflows/e2e_run_all.yaml b/.github/workflows/e2e_run_all.yaml index 90b9de475..83d8e4409 100644 --- a/.github/workflows/e2e_run_all.yaml +++ b/.github/workflows/e2e_run_all.yaml @@ -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 # @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/podvm.yaml b/.github/workflows/podvm.yaml index 2cd761376..797066f20 100644 --- a/.github/workflows/podvm.yaml +++ b/.github/workflows/podvm.yaml @@ -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