feat(plugins): Windows eBPF Plugin for retina #3801
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Images | |
on: | |
pull_request: | |
branches: [main] | |
merge_group: | |
types: [checks_requested] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
retina-images: | |
name: Build Agent Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: ["linux"] | |
arch: ["amd64", "arm64"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go version | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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: Build Images | |
shell: bash | |
run: | | |
set -euo pipefail | |
echo "TAG=$(make version)" >> $GITHUB_ENV | |
if [ "$IS_MERGE_GROUP" == "true" ]; then | |
az acr login -n ${{ vars.ACR_NAME }} | |
make retina-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \ | |
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \ | |
BUILDX_ACTION=--push | |
else | |
make retina-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} | |
fi | |
env: | |
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }} | |
retina-win-images: | |
name: Build Agent Windows Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: ["windows"] | |
arch: ["amd64"] | |
year: ["2019", "2022"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go version | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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: Build Images | |
shell: bash | |
run: | | |
set -euo pipefail | |
echo "TAG=$(make version)" >> $GITHUB_ENV | |
if [ "$IS_MERGE_GROUP" == "true" ]; then | |
az acr login -n ${{ vars.ACR_NAME }} | |
make retina-image-win \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \ | |
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \ | |
WINDOWS_YEARS=${{ matrix.year }} \ | |
BUILDX_ACTION=--push | |
else | |
make retina-image-win \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \ | |
WINDOWS_YEARS=${{ matrix.year }} | |
fi | |
env: | |
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }} | |
operator-images: | |
name: Build Operator Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: ["linux"] | |
arch: ["amd64"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go version | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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: Build Images | |
shell: bash | |
run: | | |
set -euo pipefail | |
echo "TAG=$(make version)" >> $GITHUB_ENV | |
if [ "$IS_MERGE_GROUP" == "true" ]; then | |
az acr login -n ${{ vars.ACR_NAME }} | |
make retina-operator-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \ | |
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \ | |
BUILDX_ACTION=--push | |
else | |
make retina-operator-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} | |
fi | |
env: | |
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }} | |
retina-shell-images: | |
name: Build Retina Shell Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: ["linux"] | |
arch: ["amd64", "arm64"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go version | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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: Build Images | |
shell: bash | |
run: | | |
set -euo pipefail | |
echo "TAG=$(make version)" >> $GITHUB_ENV | |
if [ "$IS_MERGE_GROUP" == "true" ]; then | |
az acr login -n ${{ vars.ACR_NAME }} | |
make retina-shell-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \ | |
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \ | |
BUILDX_ACTION=--push | |
else | |
make retina-shell-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} | |
fi | |
env: | |
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }} | |
kubectl-retina-images: | |
name: Build Kubectl Retina Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: ["linux"] | |
arch: ["amd64", "arm64"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go version | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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: Build Images | |
shell: bash | |
run: | | |
set -euo pipefail | |
echo "TAG=$(make version)" >> $GITHUB_ENV | |
if [ "$IS_MERGE_GROUP" == "true" ]; then | |
az acr login -n ${{ vars.ACR_NAME }} | |
make kubectl-retina-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \ | |
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \ | |
BUILDX_ACTION=--push | |
else | |
make kubectl-retina-image \ | |
IMAGE_NAMESPACE=${{ github.repository }} \ | |
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} | |
fi | |
env: | |
IS_MERGE_GROUP: ${{ github.event_name == 'merge_group' }} | |
manifests: | |
if: ${{ github.event_name == 'merge_group' && success('retina-images') && success('retina-win-images') && success('operator-images') && success('retina-shell-images')}} | |
name: Generate Manifests | |
runs-on: ubuntu-latest | |
needs: | |
[ | |
retina-images, | |
retina-win-images, | |
operator-images, | |
retina-shell-images, | |
kubectl-retina-images, | |
] | |
strategy: | |
matrix: | |
components: ["retina", "operator", "shell", "kubectl-retina"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Azure CLI login | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }} | |
- name: Generate Manifests | |
shell: bash | |
run: | | |
set -euo pipefail | |
az acr login -n ${{ vars.ACR_NAME }} | |
make manifest COMPONENT=${{ matrix.components }} \ | |
IMAGE_REGISTRY=${{ vars.ACR_NAME }} \ | |
e2e: | |
if: ${{ github.event_name == 'merge_group' && success('manifests')}} | |
name: Run E2E Tests | |
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 E2E Tests | |
env: | |
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION }} | |
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} | |
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 E2E Tests | |
env: | |
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 }} |