Skip to content

Commit

Permalink
Add OpenShift Route plugin to Rollouts E2E tests (#737)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan West <[email protected]>
  • Loading branch information
jgwest authored Jul 25, 2024
1 parent 13cd661 commit 0d7f54b
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion scripts/run-rollouts-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# - Runs the (cluster-scoped) E2E tests of the Argo Rollouts operator
# - Runs the upstream E2E tests from the argo-rollouts repo

set -e
set -ex

ROLLOUTS_TMP_DIR=$(mktemp -d)

Expand All @@ -18,6 +18,10 @@ cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"
# - 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=192dd2c3b5dd026e2c59c5765e98ca2f70ca01f9

# 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
Expand All @@ -35,3 +39,31 @@ cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"

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

0 comments on commit 0d7f54b

Please sign in to comment.