From f20434621ce281d22a3df7660b6bf0639e32eaa2 Mon Sep 17 00:00:00 2001 From: supershal Date: Mon, 6 Nov 2023 17:01:27 -0800 Subject: [PATCH] ci: makefile target for buildling fips etcd images --- .github/workflows/aws-e2e.yaml | 191 ++++++++++++------------- .github/workflows/trigger-aws-e2e.yaml | 61 ++++++++ 2 files changed, 156 insertions(+), 96 deletions(-) create mode 100644 .github/workflows/trigger-aws-e2e.yaml diff --git a/.github/workflows/aws-e2e.yaml b/.github/workflows/aws-e2e.yaml index 4bf0bbd2a..86ec13580 100644 --- a/.github/workflows/aws-e2e.yaml +++ b/.github/workflows/aws-e2e.yaml @@ -1,8 +1,7 @@ # Runs AWS tests when pull request opened, repopened or synchronized -name: E2E Tests - Build AWS AMI +name: E2E Tests - Build All AWS AMI on: - workflow_dispatch: - + workflow_dispatch: workflow_call: permissions: @@ -17,100 +16,100 @@ jobs: matrix: include: # CentoOS 7.9 - # - os: "centos 7.9" - # buildConfig: "basic" - # - os: "centos 7.9" - # buildConfig: "fips" - # - os: "centos 7.9" - # buildConfig: "nvidia" - os: "centos 7.9" + buildConfig: "basic" + - os: "centos 7.9" + buildConfig: "fips" + - os: "centos 7.9" + buildConfig: "nvidia" + - os: "centos 7.9" + buildConfig: "offline" + - os: "centos 7.9" + buildConfig: "offline-fips" + - os: "centos 7.9" + buildConfig: "offline-nvidia" + # RHEL 7.9 + - os: "redhat 7.9" + buildConfig: "basic" + - os: "redhat 7.9" + buildConfig: "fips" + - os: "redhat 7.9" + buildConfig: "nvidia" + - os: "redhat 7.9" + buildConfig: "offline" + - os: "redhat 7.9" + buildConfig: "offline-fips" + - os: "redhat 7.9" + buildConfig: "offline-nvidia" + # RHEL 8.4 + - os: "redhat 8.4" + buildConfig: "basic" + - os: "redhat 8.4" + buildConfig: "fips" + - os: "redhat 8.4" + buildConfig: "nvidia" + - os: "redhat 8.4" + buildConfig: "offline" + - os: "redhat 8.4" + buildConfig: "offline-fips" + - os: "redhat 8.4" + buildConfig: "offline-nvidia" + # RHEL 8.6 + - os: "redhat 8.6" + buildConfig: "basic" + - os: "redhat 8.6" + buildConfig: "fips" + - os: "redhat 8.6" + buildConfig: "nvidia" + - os: "redhat 8.6" + buildConfig: "offline" + - os: "redhat 8.6" + buildConfig: "offline-fips" + - os: "redhat 8.6" + buildConfig: "offline-nvidia" + # RHEL 8.8 + - os: "redhat 8.8" + buildConfig: "basic" + - os: "redhat 8.8" + buildConfig: "fips" + - os: "redhat 8.8" + buildConfig: "fips-kernel" + - os: "redhat 8.8" + buildConfig: "nvidia" + - os: "redhat 8.8" + buildConfig: "offline" + - os: "redhat 8.8" + buildConfig: "offline-fips" + - os: "redhat 8.8" + buildConfig: "offline-nvidia" + # SLES 15 + - os: "sles 15" + buildConfig: "basic" + - os: "sles 15" + buildConfig: "nvidia" + # Oracle 7.9 + - os: "oracle 7.9" + buildConfig: "basic" + - os: "oracle 7.9" + buildConfig: "fips" + - os: "oracle 7.9" + buildConfig: "rhck" + # Flatcar + - os: "flatcar" + buildConfig: "basic" + # Ubuntu 18.04 + - os: "ubuntu 18.04" + buildConfig: "basic" + # Ubuntu 20.04 + - os: "ubuntu 20.04" + buildConfig: "basic" + - os: "ubuntu 20.04" + buildConfig: "nvidia" + # Rocky 9.1 + - os: "rocky 9.1" + buildConfig: "basic" + - os: "rocky 9.1" buildConfig: "offline" - # - os: "centos 7.9" - # buildConfig: "offline-fips" - # - os: "centos 7.9" - # buildConfig: "offline-nvidia" - # # RHEL 7.9 - # - os: "redhat 7.9" - # buildConfig: "basic" - # - os: "redhat 7.9" - # buildConfig: "fips" - # - os: "redhat 7.9" - # buildConfig: "nvidia" - # - os: "redhat 7.9" - # buildConfig: "offline" - # - os: "redhat 7.9" - # buildConfig: "offline-fips" - # - os: "redhat 7.9" - # buildConfig: "offline-nvidia" - # # RHEL 8.4 - # - os: "redhat 8.4" - # buildConfig: "basic" - # - os: "redhat 8.4" - # buildConfig: "fips" - # - os: "redhat 8.4" - # buildConfig: "nvidia" - # - os: "redhat 8.4" - # buildConfig: "offline" - # - os: "redhat 8.4" - # buildConfig: "offline-fips" - # - os: "redhat 8.4" - # buildConfig: "offline-nvidia" - # # RHEL 8.6 - # - os: "redhat 8.6" - # buildConfig: "basic" - # - os: "redhat 8.6" - # buildConfig: "fips" - # - os: "redhat 8.6" - # buildConfig: "nvidia" - # - os: "redhat 8.6" - # buildConfig: "offline" - # - os: "redhat 8.6" - # buildConfig: "offline-fips" - # - os: "redhat 8.6" - # buildConfig: "offline-nvidia" - # # RHEL 8.8 - # - os: "redhat 8.8" - # buildConfig: "basic" - # - os: "redhat 8.8" - # buildConfig: "fips" - # - os: "redhat 8.8" - # buildConfig: "fips-kernel" - # - os: "redhat 8.8" - # buildConfig: "nvidia" - # - os: "redhat 8.8" - # buildConfig: "offline" - # - os: "redhat 8.8" - # buildConfig: "offline-fips" - # - os: "redhat 8.8" - # buildConfig: "offline-nvidia" - # # SLES 15 - # - os: "sles 15" - # buildConfig: "basic" - # - os: "sles 15" - # buildConfig: "nvidia" - # # Oracle 7.9 - # - os: "oracle 7.9" - # buildConfig: "basic" - # - os: "oracle 7.9" - # buildConfig: "fips" - # - os: "oracle 7.9" - # buildConfig: "rhck" - # # Flatcar - # - os: "flatcar" - # buildConfig: "basic" - # # Ubuntu 18.04 - # - os: "ubuntu 18.04" - # buildConfig: "basic" - # # Ubuntu 20.04 - # - os: "ubuntu 20.04" - # buildConfig: "basic" - # - os: "ubuntu 20.04" - # buildConfig: "nvidia" - # # Rocky 9.1 - # - os: "rocky 9.1" - # buildConfig: "basic" - # - os: "rocky 9.1" - # buildConfig: "offline" runs-on: - self-hosted - small @@ -122,7 +121,7 @@ jobs: fetch-depth: 0 - name: Build AWS AMI for ${{ matrix.os }} with ${{ matrix.buildConfig }} configuration - uses: ./.github/composite/aws-e2e/ + uses: ./.github/workflows/aws-e2e.yaml with: os: ${{ matrix.os }} buildConfig: ${{ matrix.buildConfig}} diff --git a/.github/workflows/trigger-aws-e2e.yaml b/.github/workflows/trigger-aws-e2e.yaml new file mode 100644 index 000000000..2c05b78cc --- /dev/null +++ b/.github/workflows/trigger-aws-e2e.yaml @@ -0,0 +1,61 @@ +name: Manually triggered E2E Tests - Build AWS AMI +on: + workflow_dispatch: + inputs: + os: + description: "Name of the operating system" + required: true + type: string + buildConfig: + description: "Build configuation options" + required: true + type: choice + default: basic + options: + - basic + - fips + - offline + - nvidia + - offline-fips + - offline-nvidia + - rhck + - fips-kernel + workflow_call: + inputs: + os: + description: "Name of the operating system" + required: true + type: string + buildConfig: + description: "Build configuation options" + type: string + +permissions: + contents: read + id-token: write + +jobs: + rune2e: + runs-on: + - self-hosted + - small + continue-on-error: false + steps: + - name: Checkout konvoy-image-builder repository + uses: actions/checkout@v4 + with: + repository: mesosphere/konvoy-image-builder + fetch-depth: 0 + + - name: Build AWS AMI for ${{ inputs.os }} with ${{ inputs.buildConfig }} configuration + uses: mesosphere/konvoy-image-builder/.github/composite/aws-e2e/ + with: + os: ${{ inputs.os }} + buildConfig: ${{ inputs.buildConfig}} + registry_mirror_url: ${{ secrets.D2IQ_DOCKER_MIRROR_REGISTRY}} + docker_username: ${{ secrets.NEXUS_USERNAME }} + docker_password: ${{ secrets.NEXUS_PASSWORD }} + aws_runner_role_arn: "arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/konvoy-image-builder" + redhat_user: ${{ secrets.RHSM_USER }} + redhat_password: ${{ secrets.RHSM_PASS }} + github_token: ${{ secrets.MESOSPHERECI_USER_TOKEN }}