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

chore(dogfood): include multiple templates under dogfood/#16846

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 16 commits intomainfromcj/ci-multiple-dogfood-templates
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
3a6b7cd
chore(dogfood): move dogfood template contents to subdir
johnstcnMar 7, 2025
a2733a1
chore(dogfood): move coder-envbuilder template under VCS control
johnstcnMar 7, 2025
9b50f9d
fixup! chore(dogfood): move coder-envbuilder template under VCS control
johnstcnMar 7, 2025
bda4920
address PR comments
johnstcnMar 10, 2025
97ea68d
fixup! address PR comments
johnstcnMar 10, 2025
3bb008e
fixup! fixup! address PR comments
johnstcnMar 10, 2025
d028fe3
replace hard-coded organization_id
johnstcnMar 10, 2025
07644b1
deduplicate
johnstcnMar 10, 2025
4b38f40
fix dirs
johnstcnMar 10, 2025
c43a047
remove contents dirs
johnstcnMar 11, 2025
8522da3
fixup! remove contents dirs
johnstcnMar 11, 2025
93d08b4
fixup! fixup! remove contents dirs
johnstcnMar 11, 2025
6df0590
undiff
johnstcnMar 11, 2025
eae0f0d
more fixups
johnstcnMar 11, 2025
f9b3552
another fixup
johnstcnMar 11, 2025
6f9c950
fix pushd/popd
johnstcnMar 11, 2025
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
3 changes: 2 additions & 1 deletion.github/dependabot.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,8 @@ updates:
# Update our Dockerfile.
- package-ecosystem: "docker"
directories:
- "/dogfood/contents"
- "/dogfood/coder"
- "/dogfood/coder-envbuilder"
- "/scripts"
- "/examples/templates/docker/build"
- "/examples/parameters/build"
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/ci.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -172,7 +172,7 @@ jobs:

- name: Get golangci-lint cache dir
run: |
linter_ver=$(egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/contents/Dockerfile | cut -d '=' -f 2)
linter_ver=$(egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/coder/Dockerfile | cut -d '=' -f 2)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$linter_ver
dir=$(golangci-lint cache status | awk '/Dir/ { print $2 }')
echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV
Expand Down
18 changes: 12 additions & 6 deletions.github/workflows/dogfood.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,7 +68,7 @@ jobs:
project: b4q6ltmpzh
token: ${{ secrets.DEPOT_TOKEN }}
buildx-fallback: true
context: "{{defaultContext}}:dogfood/contents"
context: "{{defaultContext}}:dogfood/coder"
pull: true
save: true
push: ${{ github.ref == 'refs/heads/main' }}
Expand DownExpand Up@@ -113,12 +113,18 @@ jobs:

- name: Terraform init and validate
run: |
cd dogfood
terraform init -upgrade
pushd dogfood/
terraform init
terraform validate
popd
pushd dogfood/coder
terraform init
terraform validate
cd contents
terraform init -upgrade
popd
pushd dogfood/coder-envbuilder
terraform init
terraform validate
popd

- name: Get short commit SHA
if: github.ref == 'refs/heads/main'
Expand All@@ -142,6 +148,6 @@ jobs:
# Template source & details
TF_VAR_CODER_TEMPLATE_NAME: ${{ secrets.CODER_TEMPLATE_NAME }}
TF_VAR_CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }}
TF_VAR_CODER_TEMPLATE_DIR: ./contents
TF_VAR_CODER_TEMPLATE_DIR: ./coder
TF_VAR_CODER_TEMPLATE_MESSAGE: ${{ steps.message.outputs.pr_title }}
TF_LOG: info
2 changes: 1 addition & 1 deletion.github/workflows/security.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -99,7 +99,7 @@ jobs:
# version in the comments will differ. This is also defined in
# ci.yaml.
set -euxo pipefail
cd dogfood/contents
cd dogfood/coder
mkdir -p /usr/local/bin
mkdir -p /usr/local/include

Expand Down
6 changes: 3 additions & 3 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -505,7 +505,7 @@ lint/ts: site/node_modules/.installed
lint/go:
./scripts/check_enterprise_imports.sh
./scripts/check_codersdk_imports.sh
linter_ver=$(shell egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/contents/Dockerfile | cut -d '=' -f 2)
linter_ver=$(shell egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/coder/Dockerfile | cut -d '=' -f 2)
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v$$linter_ver run
.PHONY: lint/go

Expand DownExpand Up@@ -963,5 +963,5 @@ else
endif
.PHONY: test-e2e

dogfood/contents/nix.hash: flake.nix flake.lock
sha256sum flake.nix flake.lock >./dogfood/contents/nix.hash
dogfood/coder/nix.hash: flake.nix flake.lock
sha256sum flake.nix flake.lock >./dogfood/coder/nix.hash
File renamed without changes.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ data "coder_parameter" "devcontainer_repo" {
data "coder_parameter" "devcontainer_dir" {
type = "string"
name = "Devcontainer Directory"
default = "dogfood/contents/"
default = "dogfood/coder/"
description = "Directory containing a devcontainer.json relative to the repository root"
mutable = true
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ gpg_flags=(
--yes
)

pushd "$PROJECT_ROOT/dogfood/contents/files/usr/share/keyrings"
pushd "$PROJECT_ROOT/dogfood/coder/files/usr/share/keyrings"

# Ansible PPA signing key
curl "${curl_flags[@]}" "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6125e2a8c77f2818fb7bd15b93c4a3fd7bb9c367" |
Expand Down
File renamed without changes.
49 changes: 48 additions & 1 deletiondogfood/main.tf
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@ resource "coderd_template" "dogfood" {
display_name = "Write Coder on Coder"
description = "The template to use when developing Coder on Coder!"
icon = "/emojis/1f3c5.png"
organization_id ="703f72a1-76f6-4f89-9de6-8a3989693fe5"
organization_id =data.coderd_organization.default.id
versions = [
{
name = var.CODER_TEMPLATE_VERSION
Expand DownExpand Up@@ -73,3 +73,50 @@ resource "coderd_template" "dogfood" {
time_til_dormant_autodelete_ms = 7776000000
time_til_dormant_ms = 8640000000
}


resource "coderd_template" "envbuilder_dogfood" {
name = "coder-envbuilder"
display_name = "Write Coder on Coder using Envbuilder"
description = "Write Coder on Coder using a workspace built by Envbuilder."
icon = "/emojis/1f3d7.png" # 🏗️
organization_id = data.coderd_organization.default.id
versions = [
{
name = var.CODER_TEMPLATE_VERSION
message = var.CODER_TEMPLATE_MESSAGE
directory = "./coder-envbuilder"
active = true
tf_vars = [{
# clusters/dogfood-v2/coder/provisioner/configs/values.yaml#L191-L194
name = "envbuilder_cache_dockerconfigjson_path"
value = "/home/coder/envbuilder-cache-dockerconfig.json"
}]
}
]
acl = {
groups = [{
id = data.coderd_organization.default.id
role = "use"
}]
users = [{
id = data.coderd_user.machine.id
role = "admin"
}]
}
activity_bump_ms = 10800000
allow_user_auto_start = true
allow_user_auto_stop = true
allow_user_cancel_workspace_jobs = false
auto_start_permitted_days_of_week = ["friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday"]
auto_stop_requirement = {
days_of_week = ["sunday"]
weeks = 1
}
default_ttl_ms = 28800000
deprecation_message = null
failure_ttl_ms = 604800000
require_active_version = true
time_til_dormant_autodelete_ms = 7776000000
time_til_dormant_ms = 8640000000
}
2 changes: 1 addition & 1 deletionscripts/update-flake.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,6 +37,6 @@ echo "protoc-gen-go version: $PROTOC_GEN_GO_REV"
PROTOC_GEN_GO_SHA256=$(nix-prefetch-git https://github.com/protocolbuffers/protobuf-go --rev "$PROTOC_GEN_GO_REV" | jq -r .hash)
sed -i "s#\(sha256 = \"\)[^\"]*#\1${PROTOC_GEN_GO_SHA256}#" ./flake.nix

make dogfood/contents/nix.hash
make dogfood/coder/nix.hash

echo "Flake updated successfully!"
Loading

[8]ページ先頭

©2009-2025 Movatter.jp