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