Skip to content

Commit 2bf2683

Browse files
committed
Port to mise
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent e669dd0 commit 2bf2683

17 files changed

Lines changed: 206 additions & 189 deletions

File tree

.agents/skills/bump-go-dependencies/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ go mod tidy
4646
Run the linter and the tests:
4747

4848
```sh
49-
task lint
50-
task test
49+
mise lint
50+
mise test
5151
```
5252

5353
### d. Decide

.env.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
DOCKER_AGENT_MODELS_GATEWAY=
2+
OPENAI_API_KEY=
3+
ANTHROPIC_API_KEY=
4+
GOOGLE_API_KEY=
5+
GOOGLE_GENAI_USE_VERTEXAI=
6+
MISTRAL_API_KEY=

.github/agents/issue-triager.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ agents:
123123
124124
5. **Verify**: Run tests and linting to make sure the fix is correct:
125125
```bash
126-
task test
127-
task lint
126+
mise test
127+
mise lint
128128
```
129129
If tests fail, investigate and fix. Do not leave broken tests.
130130
@@ -134,7 +134,7 @@ agents:
134134
- Do NOT modify CI/CD configs, workflows, or unrelated files
135135
- Keep changes minimal — fix the bug, nothing more
136136
- If you cannot determine a fix with confidence, make no changes and explain why
137-
- Always run `task test` and `task lint` before finishing
137+
- Always run `mise test` and `mise lint` before finishing
138138
139139
toolsets:
140140
- type: filesystem
@@ -147,7 +147,7 @@ permissions:
147147
- shell:cmd=gh issue edit *
148148
- shell:cmd=gh issue view *
149149
- shell:cmd=gh api *
150-
- shell:cmd=task test*
151-
- shell:cmd=task lint*
152-
- shell:cmd=task build*
150+
- shell:cmd=mise test*
151+
- shell:cmd=mise lint*
152+
- shell:cmd=mise build*
153153
- shell:cmd=go *

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,19 @@ jobs:
5151
go-version: "1.26.1"
5252
cache: true
5353

54-
- name: Install Task
55-
uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0
56-
with:
57-
version: 3.x
54+
- name: Install mise
55+
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
5856

5957
- name: Create bin directory
6058
run: mkdir -p "$HOME/bin"
6159

6260
- name: Build
63-
run: task build
61+
run: mise build
6462

6563
- name: Run tests
6664
run: |
67-
task test
68-
task test-binary
65+
mise test
66+
mise test-binary
6967
7068
license-check:
7169
runs-on: ubuntu-latest

.mise/helpers/git-env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export GIT_TAG=$(git describe --tags --exact-match 2>/dev/null || echo dev)
2+
export GIT_COMMIT=$(git rev-parse HEAD)

.mise/scripts/build.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
. .mise/helpers/git-env.sh
5+
6+
LDFLAGS="-X \"github.com/docker/docker-agent/pkg/version.Version=${GIT_TAG}\" -X \"github.com/docker/docker-agent/pkg/version.Commit=${GIT_COMMIT}\""
7+
8+
BINARY_NAME="docker-agent"
9+
case "$OSTYPE" in
10+
msys*|cygwin*) BINARY_NAME="${BINARY_NAME}.exe" ;;
11+
esac
12+
13+
go build -ldflags "$LDFLAGS" -o ./bin/${BINARY_NAME} ./main.go
14+
15+
if [ "${CI:-}" != "true" ]; then
16+
ln -sf "$(pwd)/bin/${BINARY_NAME}" "${HOME}/bin/${BINARY_NAME}" 2>/dev/null || true
17+
fi

.mise/scripts/docs-check-links.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
REPO_ROOT=$(cd .. && pwd)
5+
6+
cleanup() {
7+
docker rm -f docs-linkcheck 2>/dev/null
8+
docker network rm docs-linkcheck-net 2>/dev/null
9+
}
10+
trap cleanup EXIT
11+
12+
cleanup || true
13+
docker build -t docker-agent-docs .
14+
docker network create docs-linkcheck-net
15+
docker run -d --rm \
16+
--name docs-linkcheck \
17+
--network docs-linkcheck-net \
18+
-v "${REPO_ROOT}/docs:/srv/jekyll" \
19+
docker-agent-docs \
20+
jekyll serve --host 0.0.0.0 --config _config.yml,_config.dev.yml
21+
22+
echo 'Waiting for Jekyll to start...'
23+
for i in $(seq 1 30); do
24+
docker run --rm --network docs-linkcheck-net curlimages/curl -sf http://docs-linkcheck:4000/ > /dev/null 2>&1 && break
25+
sleep 2
26+
done
27+
28+
docker run --rm \
29+
--network docs-linkcheck-net \
30+
raviqqe/muffet \
31+
--buffer-size 16384 \
32+
--exclude 'fonts.googleapis.com' \
33+
--exclude 'fonts.gstatic.com' \
34+
--exclude 'console.mistral.ai' \
35+
--exclude 'console.x.ai' \
36+
--rate-limit 20 \
37+
http://docs-linkcheck:4000/

AGENTS.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
## Build and Development
44

5-
- `task build` - Build the application binary (outputs to `./bin/docker-agent`)
6-
- `task test` - Run Go tests (clears API keys to ensure deterministic tests)
7-
- `task lint` - Run golangci-lint (uses `.golangci.yml` configuration)
8-
- `task format` - Format code using golangci-lint fmt
9-
- `task dev` - Run lint, test, and build in sequence
5+
- `mise build` - Build the application binary (outputs to `./bin/docker-agent`)
6+
- `mise test` - Run Go tests (clears API keys to ensure deterministic tests)
7+
- `mise lint` - Run golangci-lint (uses `.golangci.yml` configuration)
8+
- `mise format` - Format code using golangci-lint fmt
9+
- `mise dev` - Run lint, test, and build in sequence
1010

1111
## Docker and Cross-Platform Builds
1212

13-
- `task build-local` - Build binary for local platform using Docker Buildx
14-
- `task cross` - Build binaries for multiple platforms (linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64)
15-
- `task build-image` - Build Docker image tagged as `docker/docker-agent`
16-
- `task push-image` - Build and push multi-platform Docker image to registry
13+
- `mise build-local` - Build binary for local platform using Docker Buildx
14+
- `mise cross` - Build binaries for multiple platforms (linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64)
15+
- `mise build-image` - Build Docker image tagged as `docker/docker-agent`
16+
- `mise push-image` - Build and push multi-platform Docker image to registry
1717

1818
## Running docker-agent
1919

@@ -39,7 +39,7 @@
3939
# Testing
4040

4141
- Tests located alongside source files (`*_test.go`)
42-
- Run `task test` to execute full test suite
42+
- Run `mise test` to execute full test suite
4343
- E2E tests in `e2e/` directory
4444
- Test fixtures and data in `testdata/` subdirectories
4545

Taskfile.yml

Lines changed: 0 additions & 138 deletions
This file was deleted.

docs/community/contributing/index.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ _docker-agent is open source. Here's how to set up your development environment
1414

1515
- [Go 1.26](https://go.dev/dl/) or higher
1616
- API key(s) for your chosen AI provider
17-
- [Task 3.44](https://taskfile.dev/installation/) or higher
17+
- [mise](https://mise.jdx.dev/getting-started.html)
1818
- [golangci-lint](https://golangci-lint.run/docs/welcome/install/local/)
1919

2020
<div class="callout callout-info" markdown="1">
2121
<div class="callout-title">ℹ️ Platform Support
2222
</div>
23-
<p>macOS and Linux are fully supported for development. On Windows, use <code>task build-local</code> to build via Docker.</p>
23+
<p>macOS and Linux are fully supported for development. On Windows, use <code>mise build-local</code> to build via Docker.</p>
2424

2525
</div>
2626

@@ -30,7 +30,7 @@ _docker-agent is open source. Here's how to set up your development environment
3030
# Clone and build
3131
git clone https://github.com/docker/docker-agent.git
3232
cd docker-agent
33-
task build
33+
mise build
3434

3535
# Set API keys
3636
export OPENAI_API_KEY=your_key_here
@@ -44,13 +44,13 @@ export ANTHROPIC_API_KEY=your_key_here
4444

4545
| Command | Description |
4646
| ------------------ | ----------------------------------------------- |
47-
| `task build` | Build the binary to `./bin/docker-agent` |
48-
| `task test` | Run all tests (clears API keys for determinism) |
49-
| `task lint` | Run golangci-lint |
50-
| `task format` | Format code |
51-
| `task dev` | Run lint, test, and build in sequence |
52-
| `task build-local` | Build for local platform via Docker |
53-
| `task cross` | Cross-platform builds (all architectures) |
47+
| `mise build` | Build the binary to `./bin/docker-agent` |
48+
| `mise test` | Run all tests (clears API keys for determinism) |
49+
| `mise lint` | Run golangci-lint |
50+
| `mise format` | Format code |
51+
| `mise dev` | Run lint, test, and build in sequence |
52+
| `mise build-local` | Build for local platform via Docker |
53+
| `mise cross` | Cross-platform builds (all architectures) |
5454

5555
## Dogfooding
5656

@@ -72,7 +72,7 @@ This agent is an expert Go developer that understands the docker-agent codebase.
7272

7373
## Code Style
7474

75-
The project uses `golangci-lint` with strict rules. As long as `task lint` passes, the code is stylistically acceptable.
75+
The project uses `golangci-lint` with strict rules. As long as `mise lint` passes, the code is stylistically acceptable.
7676

7777
Key conventions:
7878

@@ -101,7 +101,7 @@ File issues on the [GitHub issue tracker](https://github.com/docker/docker-agent
101101

102102
1. **Fork** the repository and create a branch for your changes
103103
2. **Write** your code following the style and testing guidelines above
104-
3. **Test** your changes: run `task lint` and `task test`
104+
3. **Test** your changes: run `mise lint` and `mise test`
105105
4. **Sign** your commits with `git commit -s` (DCO required)
106106
5. **Open a pull request** against the `main` branch
107107

0 commit comments

Comments
 (0)