|
| 1 | +name: E2E Tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + cluster-name: |
| 7 | + required: true |
| 8 | + type: string |
| 9 | + image: |
| 10 | + required: true |
| 11 | + type: string |
| 12 | +env: |
| 13 | + REGISTRY: quay.io |
| 14 | + IMAGE_NAME: rhacs-eng/roxie |
| 15 | + |
| 16 | +jobs: |
| 17 | + e2e-tests: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + container: |
| 20 | + image: quay.io/stackrox-io/apollo-ci:stackrox-test-0.5.11 |
| 21 | + env: |
| 22 | + CLUSTER_NAME: ${{ inputs.cluster-name }} |
| 23 | + KUBECONFIG: /github/home/artifacts/kubeconfig |
| 24 | + INFRA_TOKEN: ${{ secrets.INFRA_CI_TOKEN }} |
| 25 | + INFRACTL: bin/infractl -k -e localhost:8443 |
| 26 | + USE_GKE_GCLOUD_AUTH_PLUGIN: "True" |
| 27 | + steps: |
| 28 | + - name: Checkout |
| 29 | + uses: actions/checkout@v6 |
| 30 | + with: |
| 31 | + fetch-depth: 0 |
| 32 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 33 | + |
| 34 | + - name: Fix repository ownership |
| 35 | + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 36 | + |
| 37 | + - name: Log in to Quay.io |
| 38 | + uses: docker/login-action@v3 |
| 39 | + with: |
| 40 | + registry: ${{ env.REGISTRY }} |
| 41 | + username: ${{ secrets.REGISTRY_USERNAME }} |
| 42 | + password: ${{ secrets.REGISTRY_TOKEN }} |
| 43 | + |
| 44 | + - name: Extract roxie binary from image |
| 45 | + run: | |
| 46 | + docker create --name roxie-extract "${{ inputs.image }}" |
| 47 | + docker cp roxie-extract:/usr/local/bin/roxie "$GITHUB_WORKSPACE/roxie" |
| 48 | + docker rm roxie-extract |
| 49 | +
|
| 50 | + - name: Install roxie binary |
| 51 | + run: | |
| 52 | + cp "${GITHUB_WORKSPACE}/roxie" /usr/local/bin/roxie |
| 53 | + chmod +x /usr/local/bin/roxie |
| 54 | + roxie version |
| 55 | +
|
| 56 | + - name: Install roxctl |
| 57 | + env: |
| 58 | + ROXCTL_VERSION: "4.10.0" |
| 59 | + ROXCTL_SHA256: "5db647b14569465866c0162522e83393ebf02f671f4556b1b3ed551b9f8433bc" |
| 60 | + run: | |
| 61 | + curl -fsSLo /usr/local/bin/roxctl \ |
| 62 | + "https://mirror.openshift.com/pub/rhacs/assets/${ROXCTL_VERSION}/bin/Linux/roxctl" |
| 63 | + echo "${ROXCTL_SHA256} /usr/local/bin/roxctl" | sha256sum -c - |
| 64 | + chmod +x /usr/local/bin/roxctl |
| 65 | + roxctl version |
| 66 | +
|
| 67 | + - name: Authenticate to GCloud |
| 68 | + uses: google-github-actions/auth@v3 |
| 69 | + with: |
| 70 | + credentials_json: ${{ secrets.ROXIE_CI_AUTOMATION_GCP_SA }} |
| 71 | + |
| 72 | + - name: Set up Cloud SDK |
| 73 | + uses: "google-github-actions/setup-gcloud@v3" |
| 74 | + with: |
| 75 | + install_components: "gke-gcloud-auth-plugin" |
| 76 | + |
| 77 | + - name: Download production infractl |
| 78 | + uses: stackrox/actions/infra/install-infractl@v1 |
| 79 | + |
| 80 | + - name: Download artifacts |
| 81 | + run: | |
| 82 | + /github/home/.local/bin/infractl artifacts "$CLUSTER_NAME" -d /github/home/artifacts >> "$GITHUB_STEP_SUMMARY" |
| 83 | +
|
| 84 | + - name: Testing cluster connection |
| 85 | + run: | |
| 86 | + kubectl get namespaces |
| 87 | +
|
| 88 | + - name: Run e2e tests |
| 89 | + env: |
| 90 | + REGISTRY_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RO_USERNAME }} |
| 91 | + REGISTRY_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RO_PASSWORD }} |
| 92 | + SKIP_OLM_TESTS: "true" |
| 93 | + run: | |
| 94 | + make run-test-e2e |
| 95 | +
|
| 96 | + - name: Run integration tests |
| 97 | + env: |
| 98 | + REGISTRY_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RO_USERNAME }} |
| 99 | + REGISTRY_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RO_PASSWORD }} |
| 100 | + run: | |
| 101 | + make test-integration |
0 commit comments