Skip to content

Commit 3a6b7cd

Browse files
committed
chore(dogfood): move dogfood template contents to subdir
1 parent 9ded2cc commit 3a6b7cd

40 files changed

+53
-11
lines changed

.github/dependabot.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ updates:
3737
# Update our Dockerfile.
3838
- package-ecosystem: "docker"
3939
directories:
40-
- "/dogfood/contents"
40+
- "/dogfood/coder/contents"
41+
- "/dogfood/coder-envbuilder/contents"
4142
- "/scripts"
4243
- "/examples/templates/docker/build"
4344
- "/examples/parameters/build"

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172

173173
- name: Get golangci-lint cache dir
174174
run: |
175-
linter_ver=$(egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/contents/Dockerfile | cut -d '=' -f 2)
175+
linter_ver=$(egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/coder/contents/Dockerfile | cut -d '=' -f 2)
176176
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$linter_ver
177177
dir=$(golangci-lint cache status | awk '/Dir/ { print $2 }')
178178
echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV

.github/workflows/dogfood.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
project: b4q6ltmpzh
6969
token: ${{ secrets.DEPOT_TOKEN }}
7070
buildx-fallback: true
71-
context: "{{defaultContext}}:dogfood/contents"
71+
context: "{{defaultContext}}:dogfood/coder/contents"
7272
pull: true
7373
save: true
7474
push: ${{ github.ref == 'refs/heads/main' }}
@@ -113,7 +113,7 @@ jobs:
113113

114114
- name: Terraform init and validate
115115
run: |
116-
cd dogfood
116+
cd dogfood/coder
117117
terraform init -upgrade
118118
terraform validate
119119
cd contents
@@ -133,7 +133,7 @@ jobs:
133133
- name: "Push template"
134134
if: github.ref == 'refs/heads/main'
135135
run: |
136-
cd dogfood
136+
cd dogfood/coder
137137
terraform apply -auto-approve
138138
env:
139139
# Consumed by coderd provider

.github/workflows/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
# version in the comments will differ. This is also defined in
100100
# ci.yaml.
101101
set -euxo pipefail
102-
cd dogfood/contents
102+
cd dogfood/coder/contents
103103
mkdir -p /usr/local/bin
104104
mkdir -p /usr/local/include
105105

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ lint/ts: site/node_modules/.installed
505505
lint/go:
506506
./scripts/check_enterprise_imports.sh
507507
./scripts/check_codersdk_imports.sh
508-
linter_ver=$(shell egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/contents/Dockerfile | cut -d '=' -f 2)
508+
linter_ver=$(shell egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/coder/contents/Dockerfile | cut -d '=' -f 2)
509509
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v$$linter_ver run
510510
.PHONY: lint/go
511511

@@ -963,5 +963,5 @@ else
963963
endif
964964
.PHONY: test-e2e
965965

966-
dogfood/contents/nix.hash: flake.nix flake.lock
967-
sha256sum flake.nix flake.lock >./dogfood/contents/nix.hash
966+
dogfood/coder/contents/nix.hash: flake.nix flake.lock
967+
sha256sum flake.nix flake.lock >./dogfood/coder/contents/nix.hash
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

dogfood/contents/update-keys.sh renamed to dogfood/coder/contents/update-keys.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ gpg_flags=(
1515
--yes
1616
)
1717

18-
pushd "$PROJECT_ROOT/dogfood/contents/files/usr/share/keyrings"
18+
pushd "$PROJECT_ROOT/dogfood/coder/contents/files/usr/share/keyrings"
1919

2020
# Ansible PPA signing key
2121
curl "${curl_flags[@]}" "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6125e2a8c77f2818fb7bd15b93c4a3fd7bb9c367" |
File renamed without changes.

dogfood/main.tf renamed to dogfood/coder/main.tf

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,44 @@ resource "coderd_template" "dogfood" {
7373
time_til_dormant_autodelete_ms = 7776000000
7474
time_til_dormant_ms = 8640000000
7575
}
76+
77+
resource "coderd_template" "dogfood" {
78+
name = var.CODER_TEMPLATE_NAME
79+
display_name = "Write Coder on Coder"
80+
description = "The template to use when developing Coder on Coder!"
81+
icon = "/emojis/1f3c5.png"
82+
organization_id = "703f72a1-76f6-4f89-9de6-8a3989693fe5"
83+
versions = [
84+
{
85+
name = var.CODER_TEMPLATE_VERSION
86+
message = var.CODER_TEMPLATE_MESSAGE
87+
directory = var.CODER_TEMPLATE_DIR
88+
active = true
89+
}
90+
]
91+
acl = {
92+
groups = [{
93+
id = data.coderd_organization.default.id
94+
role = "use"
95+
}]
96+
users = [{
97+
id = data.coderd_user.machine.id
98+
role = "admin"
99+
}]
100+
}
101+
activity_bump_ms = 10800000
102+
allow_user_auto_start = true
103+
allow_user_auto_stop = true
104+
allow_user_cancel_workspace_jobs = false
105+
auto_start_permitted_days_of_week = ["friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday"]
106+
auto_stop_requirement = {
107+
days_of_week = ["sunday"]
108+
weeks = 1
109+
}
110+
default_ttl_ms = 28800000
111+
deprecation_message = null
112+
failure_ttl_ms = 604800000
113+
require_active_version = true
114+
time_til_dormant_autodelete_ms = 7776000000
115+
time_til_dormant_ms = 8640000000
116+
}

scripts/update-flake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ echo "protoc-gen-go version: $PROTOC_GEN_GO_REV"
3737
PROTOC_GEN_GO_SHA256=$(nix-prefetch-git https://github.com/protocolbuffers/protobuf-go --rev "$PROTOC_GEN_GO_REV" | jq -r .hash)
3838
sed -i "s#\(sha256 = \"\)[^\"]*#\1${PROTOC_GEN_GO_SHA256}#" ./flake.nix
3939
40-
make dogfood/contents/nix.hash
40+
make dogfood/coder/contents/nix.hash
4141
4242
echo "Flake updated successfully!"

0 commit comments

Comments
 (0)