Skip to content

display healthy cond on get #1051

display healthy cond on get

display healthy cond on get #1051

Workflow file for this run

name: CI-E2E
on:
push:
branches:
- main
- "release-*"
- "ci_*"
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'
workflow_dispatch:
inputs:
ginkgoParallel:
description: Run tests in parallel
default: false
type: boolean
ginkgoDryRun:
description: Run tests with dry run
default: false
type: boolean
ginkgoFlags:
description: Flags to pass directly to the ginkgo command
default: "-v"
type: string
merge_group:
env:
TEST_NAMESPACE: e2e-test
GINKGO_PARALLEL: ${{ inputs.ginkgoParallel || 'false' }}
GINKGO_DRYRUN: ${{ inputs.ginkgoDryRun || 'false' }}
GINKGO_FLAGS: ${{ inputs.ginkgoFlags || '-v' }}
jobs:
e2e_test_suite:
name: E2E Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-go@v5
with:
go-version: v1.22.x
cache: false
- name: Create AWS provider configuration
run: |
make local-setup-aws-clean local-setup-aws-generate AWS_ACCESS_KEY_ID=${{ secrets.E2E_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.E2E_AWS_SECRET_ACCESS_KEY }}
- name: Create GCP provider configuration
run: |
make local-setup-gcp-clean local-setup-gcp-generate GCP_GOOGLE_CREDENTIALS='${{ secrets.E2E_GCP_GOOGLE_CREDENTIALS }}' GCP_PROJECT_ID=${{ secrets.E2E_GCP_PROJECT_ID }}
- name: Create Azure provider configuration
run: |
make local-setup-azure-clean local-setup-azure-generate KUADRANT_AZURE_CREDENTIALS='${{ secrets.E2E_AZURE_CREDENTIALS }}'
- name: Setup environment
if: ${{ !inputs.ginkgoDryRun }}
run: |
make local-setup DEPLOY=true TEST_NAMESPACE=${{ env.TEST_NAMESPACE }}
kubectl -n ${{ env.TEST_NAMESPACE }} get secret/dns-provider-credentials-aws
kubectl -n ${{ env.TEST_NAMESPACE }} get secret/dns-provider-credentials-gcp
kubectl -n ${{ env.TEST_NAMESPACE }} get secret/dns-provider-credentials-azure
- name: Run suite AWS
run: |
export TEST_DNS_PROVIDER_SECRET_NAME=dns-provider-credentials-aws
export TEST_DNS_ZONE_DOMAIN_NAME=e2e.hcpapps.net
export TEST_DNS_NAMESPACE=${{ env.TEST_NAMESPACE }}
make test-e2e
- name: Run suite GCP
run: |
export TEST_DNS_PROVIDER_SECRET_NAME=dns-provider-credentials-gcp
export TEST_DNS_ZONE_DOMAIN_NAME=e2e.google.hcpapps.net
export TEST_DNS_NAMESPACES=${{ env.TEST_NAMESPACE }}
make test-e2e
- name: Run suite Azure
if: (github.event_name == 'push' && (github.ref_name == 'main' || startsWith(github.ref_name, 'release-')) || github.event_name == 'workflow_dispatch')
run: |
export TEST_DNS_PROVIDER_SECRET_NAME=dns-provider-credentials-azure
export TEST_DNS_ZONE_DOMAIN_NAME=e2e.azure.hcpapps.net
export TEST_DNS_NAMESPACES=${{ env.TEST_NAMESPACE }}
make test-e2e
- name: Dump Controller logs
if: ${{ failure() && !inputs.ginkgoDryRun }}
run: |
kubectl get deployments -A
kubectl logs --all-containers --ignore-errors deployments/dns-operator-controller-manager -n dns-operator-system
- name: Dump Controller metrics
if: ${{ success() && !inputs.ginkgoDryRun }}
run: |
kubectl run -q curl --image=curlimages/curl --rm -it --restart=Never --namespace dns-operator-system -- curl -XGET http://dns-operator-controller-manager-metrics-service:8080/metrics > metrics.txt
cat metrics.txt
- uses: actions/upload-artifact@v4
with:
name: metrics
path: metrics.txt
if-no-files-found: warn
- name: Exit as failure if dry run
if: ${{ success() && inputs.ginkgoDryRun }}
run: |
echo "Executed using dry run, exiting as failure"
exit 1