Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions hack/upgrade-rollouts-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,9 @@ func createNewCommitAndBranch(latestRolloutsManagerCommitId string, newBranchNam
return false, err
}

// TODO: Uncomment this once we have argo-rollouts test integration with gitops-oeprator
// if err := regenerateE2ETestScript(latestRolloutsManagerCommitId, pathToGitOpsOperatorGitRepo); err != nil {
// return false, err
// }
if err := regenerateE2ETestScript(latestRolloutsManagerCommitId, pathToGitOpsOperatorGitRepo); err != nil {
return false, err
}

if err := copyCRDsFromRolloutsManagerRepo(pathToArgoRolloutsManagerRepo, pathToGitOpsOperatorGitRepo); err != nil {
return false, fmt.Errorf("unable to copy rollouts CRDs: %w", err)
Expand Down Expand Up @@ -247,7 +246,7 @@ func regenerateE2ETestScript(commitID string, pathToGitRepo string) error {
// Format of string to modify:
// TARGET_ROLLOUT_MANAGER_COMMIT=(commit id)

path := filepath.Join(pathToGitRepo, "scripts/openshiftci-presubmit-all-tests.sh")
path := filepath.Join(pathToGitRepo, "scripts/run-rollouts-e2e-tests.sh")

fileBytes, err := os.ReadFile(path)
if err != nil {
Expand Down
34 changes: 34 additions & 0 deletions scripts/run-rollouts-e2e-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/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

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=b3e573f0e6ea3a5ec3eeba70ebb5d90e58efcd68

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

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