Skip to content

Commit f7e6f0e

Browse files
committed
Update initdemo.sh to improve Terraform provider download process
1 parent a4360c3 commit f7e6f0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

initdemo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ docker compose -f docker/compose.yml exec octopus sh -c 'apt update --allow-inse
443443
docker compose -f docker/compose.yml exec octopus sh -c 'curl -sL https://aka.ms/InstallAzureCLIDeb | bash'
444444
docker compose -f docker/compose.yml exec octopus sh -c 'if [ ! -f /usr/local/bin/kubectl ]; then curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"; install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl; fi'
445445
# Download all the terraform provider versions. This removes a point of failure during demos, as well as speeding complex deployments up.
446-
docker compose -f docker/compose.yml exec octopus sh -c 'RELEASES=$(curl --silent https://api.github.com/repos/OctopusDeploy/terraform-provider-octopusdeploy/releases | jq -r ".[0:5] | .[].name[1:]"); echo $RELEASES; for RELEASE in ${RELEASES}; do echo "Downloading https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/download/v${RELEASE}/terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; mkdir -p "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/${RELEASE}/linux_amd64"; cd "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/${RELEASE}/linux_amd64"; if [ ! -f "terraform-provider-octopusdeploy_v${RELEASE}" ]; then curl --silent -L -o "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip" "https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/download/v${RELEASE}/terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; unzip -o "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; rm "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; fi; done'
446+
docker compose -f docker/compose.yml exec octopus sh -c 'RELEASES=$(curl --silent https://api.github.com/repos/OctopusDeploy/terraform-provider-octopusdeploy/releases | jq -r ".[0:5] | .[].name[1:]"); echo $RELEASES; for RELEASE in ${RELEASES}; do echo "Downloading https://github.com/OctopusDeploy/terraform-provider-octopusdeploy/releases/download/v${RELEASE}/terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; mkdir -p "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/${RELEASE}/linux_amd64"; cd "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/${RELEASE}/linux_amd64"; if [ ! -f "terraform-provider-octopusdeploy_v${RELEASE}" ]; then curl --silent -L -o "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip" "https://github.com/OctopusDeploy/terraform-provider-octopusdeploy/releases/download/v${RELEASE}/terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; unzip -o "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; rm "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; fi; done'
447447
# Download 0.22.0 specifically, which is referenced by some of the python scripts
448-
docker compose -f docker/compose.yml exec octopus sh -c 'mkdir -p "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/1.13.11/linux_amd64"; cd "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/1.13.11/linux_amd64"; if [ ! -f "terraform-provider-octopusdeploy_v1.13.11" ]; then curl --silent -L -o "terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip" "https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/download/v1.13.11/terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip"; unzip -o "terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip"; rm "terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip"; fi'
448+
docker compose -f docker/compose.yml exec octopus sh -c 'mkdir -p "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/1.13.11/linux_amd64"; cd "/terraformcache/registry.terraform.io/octopusdeploy/octopusdeploy/1.13.11/linux_amd64"; if [ ! -f "terraform-provider-octopusdeploy_v1.13.11" ]; then curl --silent -L -o "terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip" "https://github.com/OctopusDeploy/terraform-provider-octopusdeploy/releases/download/v1.13.11/terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip"; unzip -o "terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip"; rm "terraform-provider-octopusdeploy_1.13.11_linux_amd64.zip"; fi'
449449
# https://developer.hashicorp.com/terraform/cli/config/config-file#explicit-installation-method-configuration
450450
docker compose -f docker/compose.yml exec octopus sh -c 'echo "provider_installation {\nfilesystem_mirror {\npath = \"/terraformcache\"\ninclude = [\"registry.terraform.io/octopusdeploy/octopusdeploy\"]\n}\n}" > ~/.terraformrc'
451451
docker compose -f docker/compose.yml exec octopus sh -c 'curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64; install -m 555 argocd-linux-amd64 /usr/local/bin/argocd; rm argocd-linux-amd64'

0 commit comments

Comments
 (0)