Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd9eb6d0

Browse files
committed
chore: manage dogfood template using coderd provider
1 parent91a74f0 commitd9eb6d0

36 files changed

+444
-369
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: 10 additions & 13 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' }}
@@ -90,6 +90,9 @@ jobs:
9090
cd dogfood
9191
terraform init -upgrade
9292
terraform validate
93+
cd contents
94+
terraform init -upgrade
95+
terraform validate
9396
9497
-name:Get short commit SHA
9598
if:github.ref == 'refs/heads/main'
@@ -101,22 +104,16 @@ jobs:
101104
id:message
102105
run:echo "pr_title=$(git log --format=%s -n 1 ${{ github.sha }})" >> $GITHUB_OUTPUT
103106

104-
-name:"Get latest Coder binary from the server"
105-
if:github.ref == 'refs/heads/main'
106-
run:|
107-
curl -fsSL "https://dev.coder.com/bin/coder-linux-amd64" -o "./coder"
108-
chmod +x "./coder"
109-
110107
-name:"Push template"
111108
if:github.ref == 'refs/heads/main'
112109
run:|
113-
./coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION --message="$CODER_TEMPLATE_MESSAGE"
110+
terraform apply -auto-approve
114111
env:
115112
# Consumed by Coder CLI
116113
CODER_URL:https://dev.coder.com
117114
CODER_SESSION_TOKEN:${{ secrets.CODER_SESSION_TOKEN }}
118115
# Template source & details
119-
CODER_TEMPLATE_NAME:${{ secrets.CODER_TEMPLATE_NAME }}
120-
CODER_TEMPLATE_VERSION:${{ steps.vars.outputs.sha_short }}
121-
CODER_TEMPLATE_DIR:./dogfood
122-
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

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp