2021-08-12 10:43:55 +03:00
|
|
|
trigger: none
|
|
|
|
pr: none
|
2021-04-27 16:56:30 +03:00
|
|
|
|
2021-08-12 10:43:55 +03:00
|
|
|
resources:
|
|
|
|
pipelines:
|
2023-08-01 14:41:31 +03:00
|
|
|
- pipeline: e2e
|
2024-06-25 06:51:07 +03:00
|
|
|
source: \Public Cloud ARO pipelines\CI\CI
|
2023-08-01 14:41:31 +03:00
|
|
|
trigger: true
|
2023-01-31 02:10:05 +03:00
|
|
|
containers:
|
2023-08-01 14:41:31 +03:00
|
|
|
- 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
|
2021-04-27 16:56:30 +03:00
|
|
|
|
2020-02-27 16:34:46 +03:00
|
|
|
# Azure DevOps Pipeline running e2e tests
|
|
|
|
variables:
|
2023-08-01 14:41:31 +03:00
|
|
|
- template: vars.yml
|
2023-01-04 22:27:07 +03:00
|
|
|
|
|
|
|
# Run the test suite and collect must-gather
|
2020-02-27 16:34:46 +03:00
|
|
|
jobs:
|
2023-08-01 14:41:31 +03:00
|
|
|
- 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)
|
2024-06-05 19:25:19 +03:00
|
|
|
acrCredentialsJSON: $(acr-credentials)
|
2023-08-01 14:41:31 +03:00
|
|
|
- script: |
|
|
|
|
make extract-aro-docker
|
|
|
|
displayName: Extract ARO binaries from build
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
az account set -s $AZURE_SUBSCRIPTION_ID
|
2024-06-05 17:35:51 +03:00
|
|
|
SECRET_SA_ACCOUNT_NAME=$(SECRET_SA_ACCOUNT_NAME) make secrets
|
2023-08-01 14:41:31 +03:00
|
|
|
. 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
|
2023-10-30 22:30:23 +03:00
|
|
|
./oc adm must-gather --image quay.io/cmarches/aro-must-gather:20231030.00
|
2023-08-01 14:41:31 +03: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:
|
2023-09-19 23:53:28 +03:00
|
|
|
contents: |
|
|
|
|
$(Build.SourcesDirectory)/*.png
|
|
|
|
$(Build.SourcesDirectory)/*.html
|
2023-08-01 14:41:31 +03:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
inputs:
|
|
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: Screenshots
|