This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
ManagedZone updates #1263
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: CI-E2E | |
on: | |
push: | |
branches: | |
- main | |
- "release-*" | |
- 406_dnspolicy_provider_ref | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
paths-ignore: | |
- '**.adoc' | |
- '**.md' | |
- 'samples/**' | |
- 'LICENSE' | |
pull_request_target: | |
branches: | |
- main | |
- "release-*" | |
paths-ignore: | |
- '**.adoc' | |
- '**.md' | |
- 'samples/**' | |
- 'LICENSE' | |
jobs: | |
e2e_test_suite: | |
name: E2E Test Suite | |
runs-on: ubuntu-latest | |
# see https://docs.github.com/en/graphql/reference/enums#commentauthorassociation | |
# for info on author association | |
environment: | |
${{ github.event_name == 'pull_request_target' && | |
github.event.pull_request.author_association != 'OWNER' && | |
github.event.pull_request.author_association != 'MEMBER' && | |
github.event.pull_request.author_association != 'COLLABORATOR' && | |
github.event.pull_request.author_association != 'CONTRIBUTOR' && | |
'e2e-external' || 'e2e-internal' }} | |
steps: | |
- run: cat $GITHUB_EVENT_PATH | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21.x" | |
- name: Setup environment | |
run: | | |
export OCM_SINGLE=1 | |
make local-setup | |
- name: Deploy | |
run: | | |
make docker-build-gateway-controller kind-load-gateway-controller docker-build-policy-controller kind-load-policy-controller deploy-gateway-controller | |
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system get deployments/mgc-controller-manager -o yaml | yq .spec.template.spec.containers[0].image | |
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system get deployments/mgc-policy-controller -o yaml | yq .spec.template.spec.containers[0].image | |
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system wait --timeout=300s --for=condition=Available deployment/mgc-controller-manager | |
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system wait --timeout=300s --for=condition=Available deployment/mgc-policy-controller | |
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-controller-manager -n multicluster-gateway-controller-system | |
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-policy-controller -n multicluster-gateway-controller-system | |
- name: Create AWS provider secret | |
run: | | |
echo "{\"zoneIDFilter\": [], \"domainFilter\": [\"e2e.hcpapps.net\"]}" > e2e-test-aws-provider-config.json | |
kubectl create secret generic e2e-test-aws-credentials -n multi-cluster-gateways \ | |
--type=kuadrant.io/aws \ | |
--from-literal=AWS_ACCESS_KEY_ID=${{ secrets.E2E_AWS_ACCESS_KEY_ID }} \ | |
--from-literal=AWS_SECRET_ACCESS_KEY=${{ secrets.E2E_AWS_SECRET_ACCESS_KEY }} \ | |
--from-file=CONFIG=e2e-test-aws-provider-config.json | |
- name: Create GCP provider secret | |
run: | | |
secret="${{ secrets.E2E_GOOGLE }}" | |
decoded=$(echo "$secret" | base64 --decode ) | |
echo "$decoded" >> gcp_credentials.json | |
echo "{\"zoneIDFilter\": [], \"domainFilter\": [\"e2e.google.hcpapps.net\"]}" > e2e-test-gcp-provider-config.json | |
kubectl create secret generic e2e-test-gcp-credentials -n multi-cluster-gateways \ | |
--type=kuadrant.io/gcp \ | |
--from-literal=PROJECT_ID=${{ secrets.E2E_PROJECT_ID }} \ | |
--from-file=GOOGLE=gcp_credentials.json \ | |
--from-file=CONFIG=e2e-test-gcp-provider-config.json | |
- name: Run suite AWS | |
run: | | |
export OCM_SINGLE=1 | |
export TEST_HUB_NAMESPACE=multi-cluster-gateways | |
export TEST_HUB_KUBE_CONTEXT=kind-mgc-control-plane | |
export TEST_DNS_PROVIDER_SECRET_NAME=e2e-test-aws-credentials | |
export TEST_DNS_ZONE_DOMAIN_NAME=e2e.hcpapps.net | |
export TEST_DNS_ZONE_ID=Z086929132US3PB46EOLR | |
make test-e2e | |
- name: Run suite GCP | |
run: | | |
export OCM_SINGLE=1 | |
export TEST_HUB_NAMESPACE=multi-cluster-gateways | |
export TEST_HUB_KUBE_CONTEXT=kind-mgc-control-plane | |
export TEST_DNS_PROVIDER_SECRET_NAME=e2e-test-gcp-credentials | |
export TEST_DNS_ZONE_DOMAIN_NAME=e2e.google.hcpapps.net | |
export TEST_DNS_ZONE_ID=e2e-google-hcpapps-net | |
make test-e2e | |
- name: Dump Gateway Controller logs | |
if: ${{ failure() }} | |
run: | | |
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-controller-manager -n multicluster-gateway-controller-system | |
- name: Dump Policy Controller logs | |
if: ${{ failure() }} | |
run: | | |
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-policy-controller -n multicluster-gateway-controller-system |