trigger: none pr: none resources: pipelines: - pipeline: e2e source: \Public Cloud ARO pipelines\CI\CI trigger: true containers: - container: container image: registry.access.redhat.com/ubi8/toolbox:8.8 options: --user=0 --privileged -v /dev/shm:/dev/shm --device /dev/net/tun --name vpn # Azure DevOps Pipeline running e2e tests variables: - template: vars.yml # Run the test suite and collect must-gather jobs: - job: E2E timeoutInMinutes: 180 variables: ARO_PODMAN_SOCKET: "tcp://localhost:8888" ARO_SELENIUM_HOSTNAME: "localhost" pool: name: 1es-aro-ci-pool steps: - template: ./templates/template-checkout.yml - script: | set -xe sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo dnf install -y openvpn make podman jq displayName: Setup (Container) target: container - template: ./templates/template-az-cli-login.yml parameters: azureDevOpsJSONSPN: $(aro-v4-e2e-devops-spn) - template: ./templates/template-push-images-to-acr.yml parameters: rpImageACR: $(RP_IMAGE_ACR) acrCredentialsJSON: $(acr-credentials) - script: | make extract-aro-docker displayName: Extract ARO binaries from build - script: | az account set -s $AZURE_SUBSCRIPTION_ID SECRET_SA_ACCOUNT_NAME=$(SECRET_SA_ACCOUNT_NAME) make secrets . secrets/env export CI=true . ./hack/e2e/run-rp-and-e2e.sh deploy_e2e_db displayName: Setup (Azure) - script: | export CI=true . secrets/env . ./hack/e2e/run-rp-and-e2e.sh run_vpn run_podman validate_podman_running run_portal validate_portal_running run_selenium validate_selenium_running run_rp validate_rp_running register_sub make test-e2e -o e2e.test displayName: Execute Tests target: container - script: | export CI=true . ./hack/e2e/run-rp-and-e2e.sh set -x # retrieve the kubeconfig hack/get-admin-kubeconfig.sh /subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$CLUSTER/providers/Microsoft.RedHatOpenShift/openShiftClusters/$CLUSTER >admin.kubeconfig displayName: Get admin kubeconfig for must-gather condition: failed() # must-gather collection must be run inside the container so it can access the VPN - script: | export CI=true . ./hack/e2e/run-rp-and-e2e.sh export KUBECONFIG=admin.kubeconfig # retrieve the oc cli wget -nv https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/$(OpenShiftCLIVersion)/openshift-client-linux-$(OpenShiftCLIVersion).tar.gz tar xf openshift-client-linux-$(OpenShiftCLIVersion).tar.gz ./oc adm must-gather --image quay.io/cmarches/aro-must-gather:20231030.00 tar cf must-gather.tar.gz must-gather.local.* displayName: Collect must-gather target: container condition: failed() - publish: must-gather.tar.gz artifact: must-gather displayName: Append must-gather to Pipeline condition: failed() - script: | export CI=true . ./hack/e2e/run-rp-and-e2e.sh delete_e2e_cluster kill_rp kill_selenium kill_podman kill_vpn displayName: Cleanup condition: always() target: container - script: | export CI=true . ./hack/e2e/run-rp-and-e2e.sh clean_e2e_db displayName: Cleanup (Azure) condition: always() - template: ./templates/template-az-cli-logout.yml - task: PublishTestResults@2 displayName: 📊 Publish tests results inputs: testResultsFiles: $(System.DefaultWorkingDirectory)/**/e2e-report.xml condition: succeededOrFailed() - task: CopyFiles@2 condition: succeededOrFailed() inputs: contents: | $(Build.SourcesDirectory)/*.png $(Build.SourcesDirectory)/*.html targetFolder: $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 condition: succeededOrFailed() inputs: pathToPublish: $(Build.ArtifactStagingDirectory) artifactName: Screenshots