Skip to content

Commit 8941219

Browse files
committed
update paths
1 parent ab8870d commit 8941219

File tree

6 files changed

+24
-19
lines changed

6 files changed

+24
-19
lines changed

.github/workflows/ci.yaml

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

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

.github/workflows/dogfood.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
project: b4q6ltmpzh
5757
token: ${{ secrets.DEPOT_TOKEN }}
5858
buildx-fallback: true
59-
context: "{{defaultContext}}:dogfood"
59+
context: "{{defaultContext}}:dogfood/contents"
6060
pull: true
6161
save: true
6262
push: ${{ github.ref == 'refs/heads/main' }}
@@ -69,7 +69,7 @@ jobs:
6969
token: ${{ secrets.DEPOT_TOKEN }}
7070
buildx-fallback: true
7171
context: "."
72-
file: "dogfood/Dockerfile.nix"
72+
file: "dogfood/contents/Dockerfile.nix"
7373
pull: true
7474
save: true
7575
push: ${{ github.ref == 'refs/heads/main' }}
@@ -113,7 +113,7 @@ jobs:
113113
CODER_URL: https://dev.coder.com
114114
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
115115
# Template source & details
116-
TF_VAR_coder_template_name: ${{ secrets.CODER_TEMPLATE_NAME }}
117-
TF_VAR_coder_template_version: ${{ steps.vars.outputs.sha_short }}
118-
TF_VAR_coder_template_dir: ./dogfood
119-
TF_VAR_coder_template_message: ${{ steps.message.outputs.pr_title }}
116+
TF_VAR_CODER_TEMPLATE_NAME: ${{ secrets.CODER_TEMPLATE_NAME }}
117+
TF_VAR_CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }}
118+
TF_VAR_CODER_TEMPLATE_DIR: ./dogfood/contents
119+
TF_VAR_CODER_TEMPLATE_MESSAGE: ${{ steps.message.outputs.pr_title }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ lint/ts:
451451

452452
lint/go:
453453
./scripts/check_enterprise_imports.sh
454-
linter_ver=$(shell egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/Dockerfile | cut -d '=' -f 2)
454+
linter_ver=$(shell egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/contents/Dockerfile | cut -d '=' -f 2)
455455
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v$$linter_ver run
456456
.PHONY: lint/go
457457

dogfood/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/files/usr/share/keyrings"
18+
pushd "$PROJECT_ROOT/dogfood/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" |

dogfood/main.tf

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import {
1212
id = "0d286645-29aa-4eaf-9b52-cc5d2740c90b"
1313
}
1414

15+
provider "coderd" {
16+
url = "https://dev.coder.com"
17+
token = "A2BkGi3oDN-rqs3H7k6J5mrFOih4f7kA7"
18+
}
19+
1520
data "coderd_organization" "default" {
1621
is_default = true
1722
}
@@ -20,33 +25,33 @@ data "coderd_user" "machine" {
2025
username = "machine"
2126
}
2227

23-
variable "coder_template_name" {
28+
variable "CODER_TEMPLATE_NAME" {
2429
type = string
2530
}
2631

27-
variable "coder_template_version" {
32+
variable "CODER_TEMPLATE_VERSION" {
2833
type = string
2934
}
3035

31-
variable "coder_template_dir" {
36+
variable "CODER_TEMPLATE_DIR" {
3237
type = string
3338
}
3439

35-
variable "coder_template_message" {
40+
variable "CODER_TEMPLATE_MESSAGE" {
3641
type = string
3742
}
3843

3944
resource "coderd_template" "dogfood" {
40-
name = var.coder_template_name
45+
name = var.CODER_TEMPLATE_NAME
4146
display_name = "Write Coder on Coder"
4247
description = "The template to use when developing Coder on Coder!"
4348
icon = "/emojis/1f3c5.png"
4449
organization_id = "703f72a1-76f6-4f89-9de6-8a3989693fe5"
4550
versions = [
4651
{
47-
name = var.coder_template_version
48-
message = var.coder_template_message
49-
directory = var.coder_template_dir
52+
name = var.CODER_TEMPLATE_VERSION
53+
message = var.CODER_TEMPLATE_MESSAGE
54+
directory = var.CODER_TEMPLATE_DIR
5055
active = true
5156
}
5257
]

envbuilder-dogfood/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ data "coder_parameter" "devcontainer_repo" {
4040
data "coder_parameter" "devcontainer_dir" {
4141
type = "string"
4242
name = "Devcontainer Directory"
43-
default = "dogfood/"
43+
default = "dogfood/contents/"
4444
description = "Directory containing a devcontainer.json relative to the repository root"
4545
mutable = true
4646
}
@@ -255,7 +255,7 @@ resource "coder_agent" "dev" {
255255
sleep 1
256256
done
257257
sudo chmod a+rw /var/run/docker.sock
258-
258+
259259
# Install playwright dependencies
260260
# We want to use the playwright version from site/package.json
261261
# Check if the directory exists At workspace creation as the coder_script runs in parallel so clone might not exist yet.

0 commit comments

Comments
 (0)