Skip to content

Commit

Permalink
Testing ACR#8
Browse files Browse the repository at this point in the history
  • Loading branch information
vpidatala94 committed Feb 16, 2025
1 parent 5bc712f commit e3ceadd
Showing 1 changed file with 30 additions and 51 deletions.
81 changes: 30 additions & 51 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- uses: actions/setup-go@v5
- uses: actions/setup-go@v5.3.0
with:
go-version-file: go.mod
- run: go version
Expand All @@ -50,7 +50,10 @@ jobs:
IMAGE_NAMESPACE=${{ github.repository }} \
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \
APP_INSIGHTS_ID=${{ secrets.AZURE_APP_INSIGHTS_KEY }} \
BUILDX_ACTION=--push
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}

retina-win-images:
name: Build Agent Windows Images
Expand All @@ -64,9 +67,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- uses: actions/setup-go@v5
- uses: actions/setup-go@v5.3.0
with:
go-version-file: go.mod
- run: go version
Expand All @@ -91,8 +94,11 @@ jobs:
IMAGE_NAMESPACE=${{ github.repository }} \
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \
APP_INSIGHTS_ID=${{ secrets.AZURE_APP_INSIGHTS_KEY }} \
WINDOWS_YEARS=${{ matrix.year }} \
BUILDX_ACTION=--push
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}

operator-images:
name: Build Operator Images
Expand All @@ -105,9 +111,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- uses: actions/setup-go@v5
- uses: actions/setup-go@v5.3.0
with:
go-version-file: go.mod
- run: go version
Expand All @@ -132,7 +138,10 @@ jobs:
IMAGE_NAMESPACE=${{ github.repository }} \
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \
APP_INSIGHTS_ID=${{ secrets.AZURE_APP_INSIGHTS_KEY }} \
BUILDX_ACTION=--push
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}

retina-shell-images:
name: Build Retina Shell Images
Expand All @@ -145,9 +154,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- uses: actions/setup-go@v5
- uses: actions/setup-go@v5.3.0
with:
go-version-file: go.mod
- run: go version
Expand All @@ -173,6 +182,8 @@ jobs:
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \
BUILDX_ACTION=--push
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}

kubectl-retina-images:
name: Build Kubectl Retina Images
Expand All @@ -185,9 +196,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- uses: actions/setup-go@v5
- uses: actions/setup-go@v5.3.0
with:
go-version-file: go.mod
- run: go version
Expand All @@ -213,9 +224,11 @@ jobs:
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \
BUILDX_ACTION=--push
env:
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }}

manifests:
if: ${{ success('retina-images') && success('retina-win-images') && success('operator-images') && success('retina-shell-images')}}
if: ${{ success('retina-images') && success('retina-win-images') && success('operator-images') && success('retina-shell-images') && success('kubectl-retina-images') }}
name: Generate Manifests
runs-on: ubuntu-latest
needs:
Expand All @@ -233,7 +246,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -251,20 +264,20 @@ jobs:
set -euo pipefail
az acr login -n ${{ vars.ACR_NAME }}
make manifest COMPONENT=${{ matrix.components }} \
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \
IMAGE_REGISTRY=${{ vars.ACR_NAME }}
e2e:
if: ${{ success('manifests')}}
if: ${{ success('manifests') }}
name: Run E2E Tests
runs-on: ubuntu-latest
needs: [manifests]

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- name: Setup go
uses: actions/setup-go@v5
uses: actions/setup-go@v5.3.0
with:
go-version-file: go.mod
- run: go version
Expand All @@ -283,38 +296,4 @@ jobs:
shell: bash
run: |
set -euo pipefail
go test -v ./test/e2e/. -timeout 60m -tags=e2e -count=1 -args -image-tag=$(make version) -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository}}
perf:
if: ${{ github.event_name == 'merge_group' && success('manifests')}}
name: Retina Performance Test
runs-on: ubuntu-latest
needs: [manifests]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go version

- name: Az CLI login
uses: azure/login@v2
if: ${{ github.event_name == 'merge_group' }}
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }}

- name: Run Perf Tests
env:
AZURE_APP_INSIGHTS_KEY: ${{ secrets.AZURE_APP_INSIGHTS_KEY }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
shell: bash
run: |
set -euo pipefail
go test -v ./test/e2e/. -timeout 2h -tags=perf -count=1 -args -image-tag=$(make version) -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository }}
go test -v ./test/e2e/. -timeout 60m -tags=e2e -count=1 -args -image-tag=$(make version) -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository}}

0 comments on commit e3ceadd

Please sign in to comment.