Skip to content

Commit

Permalink
e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
bitoku committed Sep 30, 2024
1 parent f868838 commit 9045572
Showing 1 changed file with 6 additions and 117 deletions.
123 changes: 6 additions & 117 deletions .pipelines/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,134 +17,23 @@ variables:

# Run the test suite and collect must-gather
jobs:
- job: E2E
timeoutInMinutes: 180
variables:
ARO_PODMAN_SOCKET: "tcp://localhost:8888"
ARO_SELENIUM_HOSTNAME: "localhost"
- job:
timeoutInMinutes: 30
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 conmon containers-common crun iptables netavark nftables slirp4netns
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
set -e
# 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

Check failure on line 36 in .pipelines/e2e.yml

View workflow job for this annotation

GitHub Actions / mega-linter-yaml

36:1 [trailing-spaces] trailing spaces
OCP_VERSION=4.14.37 OC=./oc make validate-roledef
displayName: Run check
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

0 comments on commit 9045572

Please sign in to comment.