forked from redhat-developer/gitops-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-rollouts-e2e-tests.sh
More file actions
executable file
·70 lines (43 loc) · 2.31 KB
/
Copy pathrun-rollouts-e2e-tests.sh
File metadata and controls
executable file
·70 lines (43 loc) · 2.31 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
#!/bin/bash
# The goal of this script is to run the Argo Rollouts operator tests from the argo-rollouts-manager repo against gitops-operator:
# - Runs the (cluster-scoped) E2E tests of the Argo Rollouts operator
# - Runs the upstream E2E tests from the argo-rollouts repo
set -ex
ROLLOUTS_TMP_DIR=$(mktemp -d)
cd $ROLLOUTS_TMP_DIR
git clone https://github.com/argoproj-labs/argo-rollouts-manager
cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"
# This commit value will be automatically updated by calling 'hack/upgrade-rollouts-manager/go-run.sh':
# - It should always point to the same argo-rollouts-manager commit that is referenced in go.mod of gitops-operator (which will usually be the most recent argo-rollouts-manager commit)
TARGET_ROLLOUT_MANAGER_COMMIT=a96aa79b546433ee2d68f48d424baaabed0cb2ac
# This commit value will be automatically updated by calling 'hack/upgrade-rollouts-manager/go-run.sh':
# - It should always point to the same argo-rollouts-manager commit that is referenced in the version of argo-rollouts-manager that is in go.mod
TARGET_OPENSHIFT_ROUTE_ROLLOUT_PLUGIN_COMMIT=8b4125a7f9ecffb0247df91a4c890f88c0c523b7
git checkout $TARGET_ROLLOUT_MANAGER_COMMIT
# 1) Run E2E tests from argo-rollouts-manager repo
make test-e2e
# Clean up old namespaces created by test
# NOTE: remove this once this is handled by 'make test-e2e' in argo-rollouts-manager repo
kubectl delete rolloutmanagers --all -n test-rom-ns-1 || true
cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"
# 2) Run E2E tests from argoproj/argo-rollouts repo
SKIP_RUN_STEP=true hack/run-upstream-argo-rollouts-e2e-tests.sh
# 3) Run rollouts-plugin-trafficrouter-openshift E2E tests
kubectl delete ns argo-rollouts || true
kubectl wait --timeout=5m --for=delete namespace/argo-rollouts
kubectl create ns argo-rollouts
kubectl config set-context --current --namespace=argo-rollouts
cat << EOF > "$ROLLOUTS_TMP_DIR/rollout-manager.yaml"
apiVersion: argoproj.io/v1alpha1
kind: RolloutManager
metadata:
name: argo-rollout
namespace: argo-rollouts
spec: {}
EOF
kubectl apply -f "$ROLLOUTS_TMP_DIR/rollout-manager.yaml"
cd "$ROLLOUTS_TMP_DIR"
git clone https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-openshift
cd "$ROLLOUTS_TMP_DIR/rollouts-plugin-trafficrouter-openshift"
git checkout $TARGET_OPENSHIFT_ROUTE_ROLLOUT_PLUGIN_COMMIT
make test-e2e