147147 CLUSTER_PORT=" 8443"
148148
149149 # Extract the client certificate data
150- CLIENT_CERTIFICATE=$( docker run --rm -v / $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-certificate' octoconfig.yml)
151- CLIENT_KEY=$( docker run --rm -v / $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-key' octoconfig.yml)
150+ CLIENT_CERTIFICATE=$( docker run --rm -v $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-certificate' octoconfig.yml)
151+ CLIENT_KEY=$( docker run --rm -v $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-key' octoconfig.yml)
152152
153153 # Create a self contained PFX certificate
154154 openssl pkcs12 -export -name ' test.com' -password ' pass:Password01!' -out /tmp/kind.pfx -inkey " ${CLIENT_KEY} " -in " ${CLIENT_CERTIFICATE} "
@@ -829,7 +829,7 @@ publish_runbook "PR Checks" "PR Check"
829829if [[ " ${INSTALL_ARGO} " == " TRUE" ]]
830830then
831831 # Get the Argo CD password
832- PASSWORD=$( KUBECONFIG=/tmp /octoconfig.yml argocd admin initial-password -n argocd)
832+ PASSWORD=$( KUBECONFIG=$HOME /octoconfig.yml argocd admin initial-password -n argocd)
833833 # Extract the first line of the output, which is the password
834834 PASSWORDARRAY=(${PASSWORD[@]} )
835835
@@ -844,12 +844,12 @@ then
844844 (( counter++ ))
845845
846846 # Generate a token for the user octopus
847- TOKEN=$( KUBECONFIG=/tmp /octoconfig.yml kubectl run --rm -i --image=argoproj/argocd argocdinit${counter} -- /bin/bash -c " argocd login --insecure argocd-server.argocd.svc.cluster.local --username admin --password ${PASSWORDARRAY[0]} >/dev/null; argocd account generate-token --account octopus" )
847+ TOKEN=$( KUBECONFIG=$HOME /octoconfig.yml kubectl run --rm -i --image=argoproj/argocd argocdinit${counter} -- /bin/bash -c " argocd login --insecure argocd-server.argocd.svc.cluster.local --username admin --password ${PASSWORDARRAY[0]} >/dev/null; argocd account generate-token --account octopus" )
848848
849849 exit_code=$?
850850
851851 # sometimes these pods do not clean themselves up, so force the deletion
852- KUBECONFIG=/tmp /octoconfig.yml kubectl delete pod argocdinit${counter} -n default --grace-period=0 --force > /dev/null 2>&1
852+ KUBECONFIG=$HOME /octoconfig.yml kubectl delete pod argocdinit${counter} -n default --grace-period=0 --force > /dev/null 2>&1
853853
854854 # Remove the messages captured after the token about the pod being removed
855855 TOKEN=${TOKEN%% pod \" * }
@@ -858,13 +858,13 @@ then
858858 done
859859
860860 # Save the token in a secret
861- KUBECONFIG=/tmp /octoconfig.yml kubectl create secret generic octoargosync-secret --from-literal=argotoken=${TOKEN} -n argocd
861+ KUBECONFIG=$HOME /octoconfig.yml kubectl create secret generic octoargosync-secret --from-literal=argotoken=${TOKEN} -n argocd
862862 # Deploy the octopus argo cd sync service
863- KUBECONFIG=/tmp /octoconfig.yml kubectl apply -f argocd/argocd-config/octoargosync.yaml
863+ KUBECONFIG=$HOME /octoconfig.yml kubectl apply -f argocd/argocd-config/octoargosync.yaml
864864 # Deploy the sample apps
865- KUBECONFIG=/tmp /octoconfig.yml kubectl apply -f argocd/app-of-apps-gitea.yaml
865+ KUBECONFIG=$HOME /octoconfig.yml kubectl apply -f argocd/app-of-apps-gitea.yaml
866866 # Get the admin login
867- ARGO_PASSWORD=$( KUBECONFIG=/tmp /octoconfig.yml argocd admin initial-password -n argocd)
867+ ARGO_PASSWORD=$( KUBECONFIG=$HOME /octoconfig.yml argocd admin initial-password -n argocd)
868868 # Remove the messages captured after the token about the password needing to be changed
869869 ARGO_PASSWORD=${ARGO_PASSWORD%% This password * }
870870 # Remove trailing whitespace (https://stackoverflow.com/a/3352015/8246539)
@@ -931,12 +931,12 @@ echo "Open Octopus at http://localhost:18080 - username is \"admin\" and passwor
931931echo " Open Gitea at http://localhost:3000 - username is \" octopus\" and password is \" Password01!\" " >> keys.txt
932932if [[ " ${INSTALL_ARGO} " == " TRUE" ]]
933933then
934- echo " Start a minikube tunnel in Linux/macOS with: KUBECONFIG=/tmp /octoconfig.yml minikube tunnel" >> keys.txt
935- echo " Start a minikube tunnel in WSL with: MINIKUBE_HOME=\"\$ HOME/.minikube\" KUBECONFIG=/tmp /octoconfig.yml sudo --preserve-env=MINIKUBE_HOME --preserve-env=KUBECONFIG minikube tunnel" >> keys.txt
936- echo " Wait for the Argo CD pods to start. You can see their status with: KUBECONFIG=/tmp /octoconfig.yml kubectl get pods -n argocd" >> keys.txt
937- echo " Find the Argo CD IP address with: KUBECONFIG=/tmp /octoconfig.yml kubectl get service argocd-server -n argocd" >> keys.txt
938- echo " Get the initial Argo CD admin password with: KUBECONFIG=/tmp /octoconfig.yml argocd admin initial-password -n argocd" >> keys.txt
939- echo " Get the logs for the OctopusArgoCDProxy with: KUBECONFIG=/tmp /octoconfig.yml kubectl logs -f deployment/octoargosync -n argocd" >> keys.txt
934+ echo " Start a minikube tunnel in Linux/macOS with: KUBECONFIG=$HOME /octoconfig.yml minikube tunnel" >> keys.txt
935+ echo " Start a minikube tunnel in WSL with: MINIKUBE_HOME=\"\$ HOME/.minikube\" KUBECONFIG=$HOME /octoconfig.yml sudo --preserve-env=MINIKUBE_HOME --preserve-env=KUBECONFIG minikube tunnel" >> keys.txt
936+ echo " Wait for the Argo CD pods to start. You can see their status with: KUBECONFIG=$HOME /octoconfig.yml kubectl get pods -n argocd" >> keys.txt
937+ echo " Find the Argo CD IP address with: KUBECONFIG=$HOME /octoconfig.yml kubectl get service argocd-server -n argocd" >> keys.txt
938+ echo " Get the initial Argo CD admin password with: KUBECONFIG=$HOME /octoconfig.yml argocd admin initial-password -n argocd" >> keys.txt
939+ echo " Get the logs for the OctopusArgoCDProxy with: KUBECONFIG=$HOME /octoconfig.yml kubectl logs -f deployment/octoargosync -n argocd" >> keys.txt
940940 echo " ArgoCD token for account octopus is: ${TOKEN%% pod \" * } " >> keys.txt
941941 echo " ArgoCD password is: ${ARGO_PASSWORD} " >> keys.txt
942942fi
0 commit comments