Skip to content

chore(scripts/develop.sh): auto determine first org name and run terraform init #15603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore(scripts/develop.sh): correct first org name when pushing initia…
…l template
  • Loading branch information
johnstcn committed Nov 20, 2024
commit 6ac7bd9ad1a9f6659eff39e9b82f34b16cbffc8f
5 changes: 3 additions & 2 deletions scripts/develop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DEFAULT_PASSWORD="SomeSecurePassword!"
password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}"
use_proxy=0
multi_org=0
first_org="coder"

args="$(getopt -o "" -l access-url:,use-proxy,agpl,debug,password:,multi-organization -- "$@")"
eval set -- "$args"
Expand Down Expand Up @@ -216,8 +217,8 @@ fatal() {
DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')"
printf 'docker_arch: "%s"\ndocker_host: "%s"\n' "${GOARCH}" "${DOCKER_HOST}" >"${temp_template_dir}/params.yaml"
(
echo "Pushing docker template to 'first-organization'..."
"${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org first-organization
echo "Pushing docker template to '${first_org}'..."
"${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org}"
if [ "${multi_org}" -gt "0" ]; then
echo "Pushing docker template to '${another_org}'..."
"${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}"
Expand Down