diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c6e2f2..a678263 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,7 @@ on: push: branches: - 'main' + - 'gitops-5159-e2e-test-framework' pull_request: branches: - 'main' diff --git a/test/e2e2/test-env/setup-vcluster-env.sh b/test/e2e2/test-env/setup-vcluster-env.sh index 3ec18d0..ff175fb 100755 --- a/test/e2e2/test-env/setup-vcluster-env.sh +++ b/test/e2e2/test-env/setup-vcluster-env.sh @@ -105,13 +105,23 @@ apply() { echo "-> TMP_DIR is $TMP_DIR" cp -r ${SCRIPTPATH}/* $TMP_DIR - # Comment out 'loadBalancerIP:' lines on OpenShift + # Comment out 'loadBalancerIP:' lines on OpenShift if [[ "$OPENSHIFT" != "" ]]; then sed -i.bak -e '/loadBalancerIP/s/^/#/' $TMP_DIR/control-plane/redis-service.yaml sed -i.bak -e '/loadBalancerIP/s/^/#/' $TMP_DIR/control-plane/repo-server-service.yaml sed -i.bak -e '/loadBalancerIP/s/^/#/' $TMP_DIR/control-plane/server-service.yaml fi + # Generate the server secret key for the argocd running on the managed and autonomous agent clusters + echo "-> Generate server.secretkey for agent's argocd-secrets" + if ! pwmake=$(which pwmake); then + pwmake=$(which pwgen) + fi + echo "data:" >> $TMP_DIR/agent-managed/argocd-secret.yaml + echo " server.secretkey: $($pwmake 56 | base64)" >> $TMP_DIR/agent-managed/argocd-secret.yaml + echo "data:" >> $TMP_DIR/agent-autonomous/argocd-secret.yaml + echo " server.secretkey: $($pwmake 56 | base64)" >> $TMP_DIR/agent-autonomous/argocd-secret.yaml + echo "-> Create Argo CD on control plane" cluster=control-plane