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
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "TheDiveO's devcontainer features",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/node:2": {},
"./devcontainers-cli": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"ghcr.io/devcontainers/features/docker-in-docker:3": {
"version": "latest",
"moby": false // go for the upstream Docker-CE
},
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ jobs:
- bpftool
- cni-plugins
- docsify
- grafanactl
- gocover
- go-ebpf
- go-mod-upgrade
- gocover
- goreportcard
- grafanactl
- lazygit
- local-pkgsite
- nerdctl
- pin-github-action
- pull-through-cache-registry
- wal-wahl
# - wal-wahl
baseImage:
- mcr.microsoft.com/devcontainers/base:ubuntu-24.04
- mcr.microsoft.com/devcontainers/base:ubuntu
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6

- name: "install latest devcontainer CLI"
run: npm install -g @devcontainers/cli@0.84.1

- name: "generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
run: devcontainer features test --skip-duplicated -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
run: devcontainer features test --skip-autogenerated --skip-duplicated -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ doesn't support Alpine.
| --------------------------- | ------ | ---- | ------ | ------ | ------ |
| bpftool | ✅ | ✅ | ✅ | ✅ | ✅ |
| cni-plugins | | ✅ | ✅ | ✅ | ✅ |
| docsify | | ? | ✅ | ? | ✅ |
| docsify | | | ✅ | | ✅ |
| go-ebpf | | ✅ | ✅ | ✅ | ✅ |
| go-mod-upgrade | | ✅ | ✅ | ✅ | ✅ |
| gocover | | ✅ | ✅ | ✅ | ✅ |
Expand Down
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
To test a particular devcontainer feature, say, `lazygit`:

```bash
devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu -p .
devcontainer features test -f lazygit --skip-autogenerated -i mcr.microsoft.com/devcontainers/base:ubuntu -p .
```

- `--skip-scenarios` ... tests only the `test.sh` test case, but no scenario tests.
Expand Down
4 changes: 2 additions & 2 deletions src/bpftool/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# bpftool (bpftool)

Installs bpftool from upstream https://github.com/libbpf/bpftool binary releases.
Installs bpftool binary from upstream https://github.com/libbpf/bpftool binary releases.

## Example Usage

Expand All @@ -15,7 +15,7 @@ Installs bpftool from upstream https://github.com/libbpf/bpftool binary releases

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| version | version of bpftool to install from upstream | string | latest |
| version | version of bpftool binary to install from upstream | string | latest |

## OS Support

Expand Down
6 changes: 3 additions & 3 deletions src/bpftool/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "bpftool",
"id": "bpftool",
"version": "0.0.3",
"description": "Installs bpftool from upstream https://github.com/libbpf/bpftool binary releases.",
"version": "0.0.4",
"description": "Installs bpftool binary from upstream https://github.com/libbpf/bpftool binary releases.",
"options": {
"version": {
"type": "string",
"default": "latest",
"description": "version of bpftool to install from upstream"
"description": "version of bpftool binary to install from upstream"
}
}
}
4 changes: 2 additions & 2 deletions src/docsify/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docsify",
"id": "docsify",
"version": "0.1.3",
"version": "0.2.0",
"description": "Automatically serves ./docs (or another) workspace directory via 'docsify serve' in the background.",
"options": {
"port": {
Expand All @@ -24,7 +24,7 @@
}
},
"dependsOn": {
"ghcr.io/devcontainers/features/node:1": {
"ghcr.io/devcontainers/features/node:2": {
"version": "lts"
}
},
Expand Down
17 changes: 17 additions & 0 deletions src/go-ebpf/NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## Feature Dependency

This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so
that you have full control over from where and how you bring in the go
toolchain.

For example:

```json
{
"features": {
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/thediveo/devcontainer-features/go-ebpf:1": {}
}
}
```

## PID Namespace

Depending on what your eBPF is doing inside the devcontainer (or inside a
Expand Down
19 changes: 18 additions & 1 deletion src/go-ebpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Installs clang and llvm, and on top Cilium's bpf2go.

```json
"features": {
"ghcr.io/thediveo/devcontainer-features/go-ebpf:0": {}
"ghcr.io/thediveo/devcontainer-features/go-ebpf:1": {}
}
```

Expand All @@ -23,6 +23,23 @@ Installs clang and llvm, and on top Cilium's bpf2go.

- `ms-vscode.cpptools-extension-pack`

## Feature Dependency

This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so
that you have full control over from where and how you bring in the go
toolchain.

For example:

```json
{
"features": {
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/thediveo/devcontainer-features/go-ebpf:1": {}
}
}
```

## PID Namespace

Depending on what your eBPF is doing inside the devcontainer (or inside a
Expand Down
11 changes: 4 additions & 7 deletions src/go-ebpf/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Go ebpf development",
"id": "go-ebpf",
"version": "0.0.1",
"version": "1.0.0",
"description": "Installs clang and llvm, and on top Cilium's bpf2go.",
"options": {
"bfp2go-version": {
Expand All @@ -10,12 +10,9 @@
"description": "version of bpf2go to install"
}
},
"dependsOn": {
"ghcr.io/devcontainers/features/go:1": {
"version": "latest",
"golangciLintVersion": "latest"
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/go"
],
"customizations": {
"vscode": {
"extensions": [
Expand Down
23 changes: 23 additions & 0 deletions src/go-mod-upgrade/NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## Feature Dependency

This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so
that you have full control over from where and how you bring in the go
toolchain.

For example:

```json
{
"features": {
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:1": {}
}
}
```

## `go-mod-upgrade` Command

Please refer to the [upstream repository
`@oligot/go-mod-upgrade`](https://github.com/oligot/go-mod-upgrade) for
documentation.

## OS Support

Tested only with
Expand Down
29 changes: 28 additions & 1 deletion src/go-mod-upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,38 @@ upgrade outdated Go dependencies interactively.

```json
"features": {
"ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:0": {}
"ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:1": {}
}
```

## Options

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| version | version of go-mod-upgrade to install | string | latest |

## Feature Dependency

This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so
that you have full control over from where and how you bring in the go
toolchain.

For example:

```json
{
"features": {
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:1": {}
}
}
```

## `go-mod-upgrade` Command

Please refer to the [upstream repository
`@oligot/go-mod-upgrade`](https://github.com/oligot/go-mod-upgrade) for
documentation.

## OS Support

Expand Down
22 changes: 16 additions & 6 deletions src/go-mod-upgrade/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
{
"name": "go-mod-upgrade",
"id": "go-mod-upgrade",
"version": "0.1.1",
"version": "1.0.0",
"description": "upgrade outdated Go dependencies interactively.",
"dependsOn": {
"ghcr.io/devcontainers/features/go:1": {
"version": "latest",
"golangciLintVersion": "latest"
"keywords": [
"go",
"mod",
"modules",
"dependencies"
],
"options": {
"version": {
"type": "string",
"default": "latest",
"description": "version of go-mod-upgrade to install"
}
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/go"
]
}
4 changes: 3 additions & 1 deletion src/go-mod-upgrade/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ set -e

echo "Activating feature 'go-mod-upgrade'..."

VERSION="${VERSION:-"latest"}"

mkdir -p /tmp/gotools
export GOCACHE=/tmp/gotools/cache

go install github.com/oligot/go-mod-upgrade@latest
go install "github.com/oligot/go-mod-upgrade@${VERSION}"

rm -rf /tmp/gotools
23 changes: 20 additions & 3 deletions src/gocover/NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## Feature Dependency

This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so
that you have full control over from where and how you bring in the go
toolchain.

For example:

```json
{
"features": {
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/thediveo/devcontainer-features/gocover:1": {}
}
}
```

## `gocover` Command

This feature installs a new `gocover` command into `/usr/local/bin`.
Expand All @@ -6,14 +23,14 @@ When run without any flags and arguments, `gocover` will run the unit tests
using `go test` on all packages in the Go module in the workspace, and update
the `README.md` file with a badge showing the coverage percentage.

### CLI Flags
### `gocover` CLI Flags

| Flag | Meaning |
| --- | --- |
| `-r`, `-root`, `--root` | run tests additionally also as root. |
| `-noroot`, `--no-root` | don't run tests also as root, even if feature was configured with root=true. |
| `-noroot`, `--no-root` | don't run tests also as root, even if this feature was configured with `root`:`true`. |
| `-html`, `--html` | additionally generate `coverage.html` |
| `-nohtml`, `--no-html` | don't generate `coverage.html, even if feature was configured with html=true. |
| `-nohtml`, `--no-html` | don't generate `coverage.html`, even if this feature was configured with `html`:`true`. |

### Positional Arguments

Expand Down
Loading
Loading