Skip to content

Commit 2ef05cc

Browse files
committed
Add OpenShift Route plugin to Rollouts E2E tests
Signed-off-by: Jonathan West <[email protected]>
1 parent 13cd661 commit 2ef05cc

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

scripts/run-rollouts-e2e-tests.sh

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# - Runs the (cluster-scoped) E2E tests of the Argo Rollouts operator
55
# - Runs the upstream E2E tests from the argo-rollouts repo
66

7-
set -e
7+
set -ex
88

99
ROLLOUTS_TMP_DIR=$(mktemp -d)
1010

@@ -18,6 +18,10 @@ cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"
1818
# - 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)
1919
TARGET_ROLLOUT_MANAGER_COMMIT=192dd2c3b5dd026e2c59c5765e98ca2f70ca01f9
2020

21+
# This commit value will be automatically updated by calling 'hack/upgrade-rollouts-manager/go-run.sh':
22+
# - 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
23+
TARGET_OPENSHIFT_ROUTE_ROLLOUT_PLUGIN_COMMIT=8b4125a7f9ecffb0247df91a4c890f88c0c523b7
24+
2125
git checkout $TARGET_ROLLOUT_MANAGER_COMMIT
2226

2327
# 1) Run E2E tests from argo-rollouts-manager repo
@@ -35,3 +39,31 @@ cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"
3539

3640
SKIP_RUN_STEP=true hack/run-upstream-argo-rollouts-e2e-tests.sh
3741

42+
# 3) Run rollouts-plugin-trafficrouter-openshift E2E tests
43+
44+
kubectl delete ns argo-rollouts || true
45+
46+
kubectl wait --timeout=5m --for=delete namespace/argo-rollouts
47+
48+
kubectl create ns argo-rollouts
49+
kubectl config set-context --current --namespace=argo-rollouts
50+
51+
cat << EOF > "$ROLLOUTS_TMP_DIR/rollout-manager.yaml"
52+
apiVersion: argoproj.io/v1alpha1
53+
kind: RolloutManager
54+
metadata:
55+
name: argo-rollout
56+
namespace: argo-rollouts
57+
spec: {}
58+
EOF
59+
60+
kubectl apply -f "$ROLLOUTS_TMP_DIR/rollout-manager.yaml"
61+
62+
cd "$ROLLOUTS_TMP_DIR"
63+
git clone https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-openshift
64+
65+
cd "$ROLLOUTS_TMP_DIR/rollouts-plugin-trafficrouter-openshift"
66+
67+
git checkout $TARGET_OPENSHIFT_ROUTE_ROLLOUT_PLUGIN_COMMIT
68+
69+
make test-e2e

0 commit comments

Comments
 (0)