Skip to content

refactor: conditionally use dotfiles in dogfood template #5332

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 9 commits into from
Dec 13, 2022
Merged
Changes from 6 commits
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
16 changes: 15 additions & 1 deletion dogfood/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ terraform {
}
}

# User parameters

variable "dotfiles_uri" {
description = <<-EOF
default = ""
Dotfiles repo URI (optional)

see https://dotfiles.github.io
EOF
}

variable "datocms_api_token" {
type = string
description = "An API token from DATOCMS for usage with building our website."
Expand Down Expand Up @@ -39,7 +50,10 @@ resource "coder_agent" "dev" {
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
code-server --auth none --port 13337 &
sudo service docker start
coder dotfiles -y 2>&1 | tee ~/.personalize.log
DOTFILES_URI=${var.dotfiles_uri}
if [ -n "$DOTFILES_URI" ]; then
coder dotfiles var.dotfiles_uri -y 2>&1 | tee ~/.personalize.log
fi
EOF
}

Expand Down