Skip to content

Commit 1981ac4

Browse files
committed
Allow the use of dotnet-octo
1 parent fa7223a commit 1981ac4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

initdemo.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,19 @@ then
8585
exit 1
8686
fi
8787

88-
if ! which octo
88+
if ! (which octo || which dotnet-octo)
8989
then
9090
echo "You must install the Octopus CLI"
9191
exit 1
9292
fi
9393
fi
9494

95+
OCTOCLI=octo
96+
if which dotnet-octo
97+
then
98+
OCTOCLI=dotnet-octo
99+
fi
100+
95101
# We know these test credentials, so hard code them
96102
export TF_VAR_git_username="octopus"
97103
export TF_VAR_git_password="Password01!"
@@ -876,14 +882,14 @@ then
876882
# Create the ArgoCD template and push it to Octopus
877883
pushd argocd/template || exit 1
878884
zip -r argocd_template.1.0.0.zip .
879-
octo push --server=http://localhost:18080 --apiKey=API-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -space=Spaces-4 --package=argocd_template.1.0.0.zip --replace-existing
885+
${OCTOCLI} push --server=http://localhost:18080 --apiKey=API-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -space=Spaces-4 --package=argocd_template.1.0.0.zip --replace-existing
880886
rm argocd_template.1.0.0.zip
881887
popd || exit 1
882888

883889
# Create the ArgoCD project Terraform module package and push it to Octopus
884890
pushd argocd_dashboard/projects || exit 1
885891
zip -r argocd_octopus_projects.1.0.0.zip . -i '*.tf' '*.sh'
886-
octo push --server=http://localhost:18080 --apiKey=API-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -space=Spaces-4 --package=argocd_octopus_projects.1.0.0.zip --replace-existing
892+
${OCTOCLI} push --server=http://localhost:18080 --apiKey=API-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -space=Spaces-4 --package=argocd_octopus_projects.1.0.0.zip --replace-existing
887893
rm argocd_octopus_projects.1.0.0.zip
888894
popd || exit 1
889895

0 commit comments

Comments
 (0)