Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit d6bcae5

Browse files
authored
Merge branch 'main' into vault-jwt-feat
2 parents 6b2ae87 + b14a03a commit d6bcae5

File tree

23 files changed

+723
-156
lines changed

23 files changed

+723
-156
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,8 @@ jobs:
4848
- name: Format
4949
run: bun fmt:ci
5050
- name: typos-action
51-
uses: crate-ci/typos@v1.31.1
51+
uses: crate-ci/typos@v1.32.0
5252
with:
5353
config: .github/typos.toml
5454
- name: Lint
5555
run: bun lint
56-
# Disable version check until https://github.com/coder/modules/pull/426 is merged.
57-
# This will allow us to use separate versioning for each module without failing CI. The backend already supports that.
58-
# - name: Check version
59-
# shell: bash
60-
# run: |
61-
# # check for version changes
62-
# ./update-version.sh
63-
# # Check if any changes were made in README.md files
64-
# if [[ -n "$(git status --porcelain -- '**/README.md')" ]]; then
65-
# echo "Version mismatch detected. Please run ./update-version.sh and commit the updated README.md files."
66-
# git diff -- '**/README.md'
67-
# exit 1
68-
# else
69-
# echo "No version mismatch detected. All versions are up to date."
70-
# fi

.github/workflows/deploy-registry.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- "release/*/v*" # Matches tags like release/module-name/v1.0.0
79

810
jobs:
911
deploy:
@@ -20,7 +22,7 @@ jobs:
2022
uses: actions/checkout@v4
2123

2224
- name: Authenticate to Google Cloud
23-
uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935
25+
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193
2426
with:
2527
workload_identity_provider: projects/309789351055/locations/global/workloadIdentityPools/github-actions/providers/github
2628
service_account: [email protected]
@@ -34,4 +36,8 @@ jobs:
3436
- name: Deploy to dev.registry.coder.com
3537
run: |
3638
gcloud builds triggers run 29818181-126d-4f8a-a937-f228b27d3d34 --branch dev
37-
39+
40+
- name: Deploy to registry.coder.com
41+
run: |
42+
gcloud builds triggers run 106610ff-41fb-4bd0-90a2-7643583fb9c0 --branch main
43+

.icons/windsurf.svg

Lines changed: 43 additions & 0 deletions
Loading

CONTRIBUTING.md

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Follow the instructions to ensure that Bun is available globally. Once Bun has b
2222

2323
## Testing a Module
2424

25-
> **Note:** It is the responsibility of the module author to implement tests for their module. The author must test the module locally before submitting a PR.
25+
> [!NOTE]
26+
> It is the responsibility of the module author to implement tests for their module. The author must test the module locally before submitting a PR.
2627
2728
A suite of test-helpers exists to run `terraform apply` on modules with variables, and test script output against containers.
2829

@@ -53,23 +54,44 @@ module "example" {
5354

5455
## Releases
5556

56-
> [!WARNING]
57-
> When creating a new release, make sure that your new version number is fully accurate. If a version number is incorrect or does not exist, we may end up serving incorrect/old data for our various tools and providers.
57+
The release process is automated with these steps:
58+
59+
## 1. Create and Merge PR
60+
61+
- Create a PR with your module changes
62+
- Get your PR reviewed, approved, and merged to `main`
63+
64+
## 2. Prepare Release (Maintainer Task)
65+
66+
After merging to `main`, a maintainer will:
67+
68+
- View all modules and their current versions:
69+
70+
```shell
71+
./release.sh --list
72+
```
73+
74+
- Determine the next version number based on changes:
75+
76+
- **Patch version** (1.2.3 → 1.2.4): Bug fixes
77+
- **Minor version** (1.2.3 → 1.3.0): New features, adding inputs, deprecating inputs
78+
- **Major version** (1.2.3 → 2.0.0): Breaking changes (removing inputs, changing input types)
5879

59-
Much of our release process is automated. To cut a new release:
80+
- Create and push an annotated tag:
6081

61-
1. Navigate to [GitHub's Releases page](https://github.com/coder/modules/releases)
62-
2. Click "Draft a new release"
63-
3. Click the "Choose a tag" button and type a new release number in the format `v<major>.<minor>.<patch>` (e.g., `v1.18.0`). Then click "Create new tag".
64-
4. Click the "Generate release notes" button, and clean up the resulting README. Be sure to remove any notes that would not be relevant to end-users (e.g., bumping dependencies).
65-
5. Once everything looks good, click the "Publish release" button.
82+
```shell
83+
# Fetch latest changes
84+
git fetch origin
85+
86+
# Create and push tag
87+
./release.sh module-name 1.2.3 --push
88+
```
6689

67-
Once the release has been cut, a script will run to check whether there are any modules that will require that the new release number be published to Terraform. If there are any, a new pull request will automatically be generated. Be sure to approve this PR and merge it into the `main` branch.
90+
The tag format will be: `release/module-name/v1.2.3`
6891

69-
Following that, our automated processes will handle publishing new data for [`registry.coder.com`](https://github.com/coder/registry.coder.com/):
92+
## 3. Publishing to Registry
7093

71-
1. Publishing new versions to Coder's [Terraform Registry](https://registry.terraform.io/providers/coder/coder/latest)
72-
2. Publishing new data to the [Coder Registry](https://registry.coder.com)
94+
Our automated processes will handle publishing new data to [registry.coder.com](https://registry.coder.com).
7395

7496
> [!NOTE]
75-
> Some data in `registry.coder.com` is fetched on demand from the Module repo's main branch. This data should be updated almost immediately after a new release, but other changes will take some time to propagate.
97+
> Some data in registry.coder.com is fetched on demand from the [coder/modules](https://github.com/coder/modules) repo's `main` branch. This data should update almost immediately after a release, while other changes will take some time to propagate.

claude-code/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude
1414
```tf
1515
module "claude-code" {
1616
source = "registry.coder.com/modules/claude-code/coder"
17-
version = "1.1.0"
17+
version = "1.2.1"
1818
agent_id = coder_agent.example.id
1919
folder = "/home/coder"
2020
install_claude_code = true
@@ -71,7 +71,7 @@ data "coder_parameter" "ai_prompt" {
7171
resource "coder_agent" "main" {
7272
# ...
7373
env = {
74-
CODER_MCP_CLAUDE_API_KEY = var.anthropic_api_key # or use a coder_parameter
74+
CODER_MCP_CLAUDE_API_KEY = var.anthropic_api_key # or use a coder_parameter
7575
CODER_MCP_CLAUDE_TASK_PROMPT = data.coder_parameter.ai_prompt.value
7676
CODER_MCP_APP_STATUS_SLUG = "claude-code"
7777
CODER_MCP_CLAUDE_SYSTEM_PROMPT = <<-EOT
@@ -102,7 +102,7 @@ Run Claude Code as a standalone app in your workspace. This will install Claude
102102
```tf
103103
module "claude-code" {
104104
source = "registry.coder.com/modules/claude-code/coder"
105-
version = "1.1.0"
105+
version = "1.2.1"
106106
agent_id = coder_agent.example.id
107107
folder = "/home/coder"
108108
install_claude_code = true

claude-code/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ resource "coder_script" "claude_code" {
151151
export LC_ALL=en_US.UTF-8
152152
153153
# Create a new tmux session in detached mode
154-
tmux new-session -d -s claude-code -c ${var.folder} "claude"
154+
tmux new-session -d -s claude-code -c ${var.folder} "claude --dangerously-skip-permissions"
155155
156156
# Send the prompt to the tmux session if needed
157157
if [ -n "$CODER_MCP_CLAUDE_TASK_PROMPT" ]; then

devcontainers-cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The devcontainers-cli module provides an easy way to install [`@devcontainers/cl
1616
```tf
1717
module "devcontainers-cli" {
1818
source = "registry.coder.com/modules/devcontainers-cli/coder"
19-
version = "1.0.1"
19+
version = "1.0.3"
2020
agent_id = coder_agent.example.id
2121
}
2222
```

devcontainers-cli/main.test.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,21 @@ const executeScriptInContainerWithPackageManager = async (
4040
]);
4141
}
4242

43-
const resp = await execContainer(id, [shell, "-c", instance.script]);
43+
const pathResp = await execContainer(id, [shell, "-c", "echo $PATH"]);
44+
const path = pathResp.stdout.trim();
45+
46+
console.log(path);
47+
48+
const resp = await execContainer(
49+
id,
50+
[shell, "-c", instance.script],
51+
[
52+
"--env",
53+
"CODER_SCRIPT_BIN_DIR=/tmp/coder-script-data/bin",
54+
"--env",
55+
`PATH=${path}:/tmp/coder-script-data/bin`,
56+
],
57+
);
4458
const stdout = resp.stdout.trim().split("\n");
4559
const stderr = resp.stderr.trim().split("\n");
4660
return {
@@ -104,7 +118,7 @@ describe("devcontainers-cli", async () => {
104118
"Installing @devcontainers/cli using yarn...",
105119
);
106120
expect(output.stdout[output.stdout.length - 1]).toEqual(
107-
"🥳 @devcontainers/cli has been installed into /usr/local/bin/devcontainer!",
121+
"🥳 @devcontainers/cli has been installed into /tmp/coder-script-data/bin/devcontainer!",
108122
);
109123
}, 15000);
110124

devcontainers-cli/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ install() {
3838
fi
3939
pnpm add -g @devcontainers/cli
4040
elif [ "$PACKAGE_MANAGER" = "yarn" ]; then
41-
yarn global add @devcontainers/cli
41+
yarn global add @devcontainers/cli --prefix "$(dirname "$CODER_SCRIPT_BIN_DIR")"
4242
fi
4343
}
4444

goose/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Run the [Goose](https://block.github.io/goose/) agent in your workspace to gener
1414
```tf
1515
module "goose" {
1616
source = "registry.coder.com/modules/goose/coder"
17-
version = "1.0.31"
17+
version = "1.1.0"
1818
agent_id = coder_agent.example.id
1919
folder = "/home/coder"
2020
install_goose = true
@@ -72,11 +72,11 @@ resource "coder_agent" "main" {
7272
env = {
7373
GOOSE_SYSTEM_PROMPT = <<-EOT
7474
You are a helpful assistant that can help write code.
75-
75+
7676
Run all long running tasks (e.g. npm run dev) in the background and not in the foreground.
77-
77+
7878
Periodically check in on background tasks.
79-
79+
8080
Notify Coder of the status of the task before and after your steps.
8181
EOT
8282
GOOSE_TASK_PROMPT = data.coder_parameter.ai_prompt.value
@@ -90,7 +90,7 @@ resource "coder_agent" "main" {
9090
module "goose" {
9191
count = data.coder_workspace.me.start_count
9292
source = "registry.coder.com/modules/goose/coder"
93-
version = "1.0.31"
93+
version = "1.1.0"
9494
agent_id = coder_agent.example.id
9595
folder = "/home/coder"
9696
install_goose = true
@@ -148,7 +148,7 @@ Run Goose as a standalone app in your workspace. This will install Goose and run
148148
```tf
149149
module "goose" {
150150
source = "registry.coder.com/modules/goose/coder"
151-
version = "1.0.31"
151+
version = "1.1.0"
152152
agent_id = coder_agent.example.id
153153
folder = "/home/coder"
154154
install_goose = true

jetbrains-gateway/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Consult the [JetBrains documentation](https://www.jetbrains.com/help/idea/prereq
1818
module "jetbrains_gateway" {
1919
count = data.coder_workspace.me.start_count
2020
source = "registry.coder.com/modules/jetbrains-gateway/coder"
21-
version = "1.0.28"
21+
version = "1.1.0"
2222
agent_id = coder_agent.example.id
2323
folder = "/home/coder/example"
2424
jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"]
@@ -36,7 +36,7 @@ module "jetbrains_gateway" {
3636
module "jetbrains_gateway" {
3737
count = data.coder_workspace.me.start_count
3838
source = "registry.coder.com/modules/jetbrains-gateway/coder"
39-
version = "1.0.28"
39+
version = "1.1.0"
4040
agent_id = coder_agent.example.id
4141
folder = "/home/coder/example"
4242
jetbrains_ides = ["GO", "WS"]
@@ -50,7 +50,7 @@ module "jetbrains_gateway" {
5050
module "jetbrains_gateway" {
5151
count = data.coder_workspace.me.start_count
5252
source = "registry.coder.com/modules/jetbrains-gateway/coder"
53-
version = "1.0.28"
53+
version = "1.1.0"
5454
agent_id = coder_agent.example.id
5555
folder = "/home/coder/example"
5656
jetbrains_ides = ["IU", "PY"]
@@ -65,7 +65,7 @@ module "jetbrains_gateway" {
6565
module "jetbrains_gateway" {
6666
count = data.coder_workspace.me.start_count
6767
source = "registry.coder.com/modules/jetbrains-gateway/coder"
68-
version = "1.0.28"
68+
version = "1.1.0"
6969
agent_id = coder_agent.example.id
7070
folder = "/home/coder/example"
7171
jetbrains_ides = ["IU", "PY"]
@@ -90,7 +90,7 @@ module "jetbrains_gateway" {
9090
module "jetbrains_gateway" {
9191
count = data.coder_workspace.me.start_count
9292
source = "registry.coder.com/modules/jetbrains-gateway/coder"
93-
version = "1.0.28"
93+
version = "1.1.0"
9494
agent_id = coder_agent.example.id
9595
folder = "/home/coder/example"
9696
jetbrains_ides = ["GO", "WS"]
@@ -108,7 +108,7 @@ Due to the highest priority of the `ide_download_link` parameter in the `(jetbra
108108
module "jetbrains_gateway" {
109109
count = data.coder_workspace.me.start_count
110110
source = "registry.coder.com/modules/jetbrains-gateway/coder"
111-
version = "1.0.28"
111+
version = "1.1.0"
112112
agent_id = coder_agent.example.id
113113
folder = "/home/coder/example"
114114
jetbrains_ides = ["GO", "WS"]

0 commit comments

Comments
 (0)