data-plane components installation guide #646
Workflow file for this run
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 | |
paths-ignore: | |
- '**.adoc' | |
- '**.md' | |
- 'samples/**' | |
- 'LICENSE' | |
pull_request_target: | |
branches: | |
- main | |
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.20.x" | |
- name: Create controller-config.env | |
run: | | |
echo "AWS_DNS_PUBLIC_ZONE_ID=${{ secrets.E2E_AWS_DNS_PUBLIC_ZONE_ID }}" >> controller-config.env | |
echo "ZONE_ROOT_DOMAIN=${{ secrets.E2E_AWS_DNS_PUBLIC_ZONE_NAME }}" >> controller-config.env | |
echo "ZONE_NAME=${{ secrets.E2E_GCP_ZONE_NAME }}" >> controller-config.env | |
echo "ZONE_DNS_NAME=${{ secrets.E2E_GCP_ZONE_DNS_NAME }}" >> controller-config.env | |
- name: Create aws-credentials.env | |
run: | | |
echo "AWS_ACCESS_KEY_ID=${{ secrets.E2E_AWS_ACCESS_KEY_ID }}" >> aws-credentials.env | |
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.E2E_AWS_SECRET_ACCESS_KEY }}" >> aws-credentials.env | |
echo "AWS_REGION=${{ env.AWS_REGION }}" >> aws-credentials.env | |
- name: Create gcp-credentials.env | |
run: | | |
secret="${{ secrets.E2E_GOOGLE }}" | |
decoded=$(echo "$secret" | base64 --decode ) | |
echo "GOOGLE=$decoded" >> gcp-credentials.env | |
echo "PROJECT_ID=${{ secrets.E2E_PROJECT_ID }}" >> gcp-credentials.env | |
- name: Setup environment | |
run: | | |
export OCM_SINGLE=1 | |
make local-setup | |
- name: Deploy MGC | |
run: | | |
make kind-load-controller deploy-controller | |
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 logs --all-containers --ignore-errors deployment/mgc-controller-manager -n multicluster-gateway-controller-system | |
kubectl get managedzones -n multi-cluster-gateways mgc-dev-mz-aws -o yaml | |
kubectl --context kind-mgc-control-plane -n multi-cluster-gateways wait --timeout=60s --for=condition=Ready managedzone/mgc-dev-mz-aws | |
kubectl get managedzones -n multi-cluster-gateways mgc-dev-mz-gcp -o yaml | |
kubectl --context kind-mgc-control-plane -n multi-cluster-gateways wait --timeout=60s --for=condition=Ready managedzone/mgc-dev-mz-gcp | |
- 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_MANAGED_ZONE=${{ secrets.E2E_AWS_DNS_PUBLIC_ZONE_NAME }} | |
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_MANAGED_ZONE=${{ secrets.E2E_GCP_ZONE_DNS_NAME }} | |
make test-e2e | |
- name: Dump MGC logs | |
if: ${{ failure() }} | |
run: | | |
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-controller-manager -n multicluster-gateway-controller-system |