Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ jobs:
exit 1
fi

# run unit tests
unit-tests:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}

- name: Run unit tests
run: go test -run '' builder/installer

# Build Job
build:
needs: verify-readme-files
Expand Down
94 changes: 94 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug kubectl installer (all defaults)",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/features/src/kubectl",
"cwd": "${workspaceFolder}",
"args": [
"-version=latest",
"-kubectxVersion=latest",
"-kubensVersion=latest",
"-k9sVersion=none",
"-helmVersion=none",
"-kustomizeVersion=none",
"-kubeconformVersion=none",
"-kubescoreVersion=none",
"-downloadUrl=",
"-kubectxDownloadUrl=",
"-kubensDownloadUrl=",
"-k9sDownloadUrl=",
"-helmDownloadUrl=",
"-kustomizeDownloadUrl=",
"-kubeconformDownloadUrl=",
"-kubescoreDownloadUrl="
]
},
{
"name": "Debug kubectl installer (all defaults and token)",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/features/src/kubectl",
"cwd": "${workspaceFolder}",
"args": [
"-version=latest",
"-kubectxVersion=latest",
"-kubensVersion=latest",
"-k9sVersion=none",
"-helmVersion=none",
"-kustomizeVersion=none",
"-kubeconformVersion=none",
"-kubescoreVersion=none",
"-downloadUrl=",
"-kubectxDownloadUrl=",
"-kubensDownloadUrl=",
"-k9sDownloadUrl=",
"-helmDownloadUrl=",
"-kustomizeDownloadUrl=",
"-kubeconformDownloadUrl=",
"-kubescoreDownloadUrl="
],
"env": {
"DEV_FEATURE_TOKEN_GITHUB_API": "<github_api_token>"
}
},
{
"name": "Debug kubectl installer (pinned versions)",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/features/src/kubectl",
"cwd": "${workspaceFolder}",
"args": [
"-version=1.31.2",
"-kubectxVersion=0.9.5",
"-kubensVersion=0.9.5",
"-k9sVersion=0.32.5",
"-helmVersion=3.16.2",
"-kustomizeVersion=5.4.2",
"-kubeconformVersion=0.6.6",
"-kubescoreVersion=1.18.0",
"-downloadUrl=",
"-kubectxDownloadUrl=",
"-kubensDownloadUrl=",
"-k9sDownloadUrl=",
"-helmDownloadUrl=",
"-kustomizeDownloadUrl=",
"-kubeconformDownloadUrl=",
"-kubescoreDownloadUrl="
]
},
{
"name": "Debug current Go file",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${file}",
"cwd": "${workspaceFolder}"
}
]
}
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,26 @@ and then run the installer:
/data/kubectl.bin --version=1.35.0
```

If you are running this command inside a devcontainer (for example via docker-out), note that bind mount source paths are resolved by the Docker daemon host, not by the devcontainer filesystem. If the mounted folder looks empty in the second container, use a host-valid absolute path or use `docker cp` as a fallback.

Quick troubleshooting check (replace `<host-path>` with the path you want to mount):
```bash
docker run --rm -v <host-path>:/data debian ls -la /data
```

Fallback example using `docker cp`:
```bash
cid=$(docker create -it debian /bin/bash)
docker cp ./kubectl.bin $cid:/data/kubectl.bin
docker start -ai $cid
```

Inside the container:
```bash
ls -l /data
/data/kubectl.bin --version=1.35.0
```

Alternatively, you can just pack a feature (use the tasks from `build/build.go`) and simply extract it into a `.devcontainer` folder and then use it from there as a local feature (`.my-feature {}`).

Here is a one-liner that prepares the defined feature in this project:
Expand Down
2 changes: 1 addition & 1 deletion features/src/apm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs APM (Agent Package Manager).

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/apm:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/apm:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/apm/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "apm",
"version": "1.0.0",
"version": "1.1.0",
"name": "APM (Agent Package Manager)",
"description": "Installs APM (Agent Package Manager).",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/claude-code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs Claude Code, Anthropic's AI coding assistant CLI.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/claude-code:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/claude-code:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/claude-code/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "claude-code",
"version": "1.0.0",
"version": "1.1.0",
"name": "claude-code",
"description": "Installs Claude Code, Anthropic's AI coding assistant CLI.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/docker-out/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs a Docker client which re-uses the host Docker socket.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/docker-out:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/docker-out:1.1.0": {
"version": "latest",
"composeVersion": "latest",
"buildxVersion": "latest",
Expand Down
2 changes: 1 addition & 1 deletion features/src/docker-out/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "docker-out",
"version": "1.0.0",
"version": "1.1.0",
"name": "Docker outside Docker",
"description": "Installs a Docker client which re-uses the host Docker socket.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/git-lfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs Git LFS.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/git-lfs:1.0.1": {
"ghcr.io/postfinance/devcontainer-features/git-lfs:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/git-lfs/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "git-lfs",
"version": "1.0.1",
"version": "1.1.0",
"name": "Git LFS",
"description": "Installs Git LFS.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/github-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs the GitHub CLI.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/github-cli:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/github-cli:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/github-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "github-cli",
"version": "1.0.0",
"version": "1.1.0",
"name": "GitHub CLI",
"description": "Installs the GitHub CLI.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/github-copilot-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs GitHub Copilot CLI (copilot), the AI-powered coding assistant for the t

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/github-copilot-cli:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/github-copilot-cli:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/github-copilot-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "github-copilot-cli",
"version": "1.0.0",
"version": "1.1.0",
"name": "GitHub Copilot CLI",
"description": "Installs GitHub Copilot CLI (copilot), the AI-powered coding assistant for the terminal.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/gonovate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs Gonovate.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/gonovate:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/gonovate:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/gonovate/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "gonovate",
"version": "1.0.0",
"version": "1.1.0",
"name": "Gonovate",
"description": "Installs Gonovate.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/goreleaser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs GoReleaser.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/goreleaser:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/goreleaser:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/goreleaser/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "goreleaser",
"version": "1.0.0",
"version": "1.1.0",
"name": "GoReleaser",
"description": "Installs GoReleaser.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/kubectl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs kubectl and other tools for managing kubernetes.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/kubectl:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/kubectl:1.1.0": {
"version": "latest",
"kubectxVersion": "latest",
"kubensVersion": "latest",
Expand Down
2 changes: 1 addition & 1 deletion features/src/kubectl/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "kubectl",
"version": "1.0.0",
"version": "1.1.0",
"name": "kubectl",
"description": "Installs kubectl and other tools for managing kubernetes.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/opencode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs opencode, the open source AI coding agent.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/opencode:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/opencode:1.1.0": {
"version": "latest",
"downloadUrl": ""
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/opencode/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "opencode",
"version": "1.0.0",
"version": "1.1.0",
"name": "opencode",
"description": "Installs opencode, the open source AI coding agent.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs Python.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/python:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/python:1.1.0": {
"version": "latest",
"downloadUrl": "",
"pipIndex": "",
Expand Down
2 changes: 1 addition & 1 deletion features/src/python/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "python",
"version": "1.0.0",
"version": "1.1.0",
"name": "Python",
"description": "Installs Python.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A package which installs Rust, common Rust utilities and their required dependen

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/rust:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/rust:1.1.0": {
"version": "latest",
"rustupVersion": "latest",
"profile": "minimal",
Expand Down
2 changes: 1 addition & 1 deletion features/src/rust/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "rust",
"version": "1.0.0",
"version": "1.1.0",
"name": "Rust",
"description": "A package which installs Rust, common Rust utilities and their required dependencies.",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/sonar-scanner-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs the SonarScanner CLI.

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/sonar-scanner-cli:1.0.0": {
"ghcr.io/postfinance/devcontainer-features/sonar-scanner-cli:1.1.0": {
"version": "latest",
"includeJre": true,
"downloadUrl": ""
Expand Down
2 changes: 1 addition & 1 deletion features/src/sonar-scanner-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "sonar-scanner-cli",
"version": "1.0.0",
"version": "1.1.0",
"name": "SonarScanner CLI",
"description": "Installs the SonarScanner CLI.",
"options": {
Expand Down
Loading