Skip to content

Commit 392018e

Browse files
committed
The scripts used to query the workspace need the specific version of terraform installed.
1 parent 82ed362 commit 392018e

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

initdemo.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ docker compose -f docker/compose.yml exec octopus sh -c 'curl -sL https://aka.ms
439439
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'
440440
# Download all the terraform provider versions. This removes a point of failure during demos, as well as speeding complex deployments up.
441441
docker compose -f docker/compose.yml exec octopus sh -c 'RELEASES=$(curl --silent https://api.github.com/repos/OctopusDeployLabs/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/octopusdeploylabs/octopusdeploy/${RELEASE}/linux_amd64"; cd "/terraformcache/registry.terraform.io/octopusdeploylabs/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 "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; rm "terraform-provider-octopusdeploy_${RELEASE}_linux_amd64.zip"; fi; done'
442+
# Download 0.13.2 specifically, which is referenced by some of the python scripts
443+
docker compose -f docker/compose.yml exec octopus sh -c 'mkdir -p "/terraformcache/registry.terraform.io/octopusdeploylabs/octopusdeploy/0.13.2/linux_amd64"; cd "/terraformcache/registry.terraform.io/octopusdeploylabs/octopusdeploy/0.13.2/linux_amd64"; if [ ! -f "terraform-provider-octopusdeploy_v${RELEASE}" ]; then curl --silent -L -o "terraform-provider-octopusdeploy_0.13.2_linux_amd64.zip" "https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/download/v0.13.2/terraform-provider-octopusdeploy_0.13.2_linux_amd64.zip"; unzip "terraform-provider-octopusdeploy_0.13.2_linux_amd64.zip"; rm "terraform-provider-octopusdeploy_0.13.2_linux_amd64.zip"; fi'
442444
# https://developer.hashicorp.com/terraform/cli/config/config-file#explicit-installation-method-configuration
443445
docker compose -f docker/compose.yml exec octopus sh -c 'echo "provider_installation {\nfilesystem_mirror {\npath = \"/terraformcache\"\ninclude = [\"registry.terraform.io/octopusdeploylabs/octopusdeploy\"]\n}\n}" > ~/.terraformrc'
444446
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'

management_instance/runbooks/shared_scripts/find_conflicts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def init_argparse():
153153
terraform {{
154154
backend "{backend_type}" {{}}
155155
required_providers {{
156-
octopusdeploy = {{ source = "OctopusDeployLabs/octopusdeploy", version = "0.12.7" }}
156+
octopusdeploy = {{ source = "OctopusDeployLabs/octopusdeploy", version = "0.13.2" }}
157157
}}
158158
}}
159159
""")

management_instance/runbooks/shared_scripts/list_downstream_projects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def init_argparse():
116116
backend "{backend_type}" {{
117117
}}
118118
required_providers {{
119-
octopusdeploy = {{ source = "OctopusDeployLabs/octopusdeploy", version = "0.12.7" }}
119+
octopusdeploy = {{ source = "OctopusDeployLabs/octopusdeploy", version = "0.13.2" }}
120120
}}
121121
}}
122122
""")
@@ -143,6 +143,7 @@ def init_argparse():
143143

144144
execute(['terraform', 'workspace', 'select', trimmed_workspace])
145145
workspace_json, _, _, = execute(['terraform', 'show', '-json'])
146+
printverbose(workspace_json)
146147
state = json.loads(workspace_json)
147148
resources = [x for x in state.get('values', {}).get('root_module', {}).get('resources', {}) if
148149
x.get('type', '') == 'octopusdeploy_project']

management_instance/runbooks/shared_scripts/merge_all_downstream_projects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def init_terraform(parser):
169169
backend "{backend_type}" {{
170170
}}
171171
required_providers {{
172-
octopusdeploy = {{ source = "OctopusDeployLabs/octopusdeploy", version = "0.12.7" }}
172+
octopusdeploy = {{ source = "OctopusDeployLabs/octopusdeploy", version = "0.13.2" }}
173173
}}
174174
}}
175175
""")

0 commit comments

Comments
 (0)