FEATURE_STRUCTURE: TEXT<< src// devcontainer-feature.json metadata: id, name, version, description, options install.sh installer runs as root inside the container test// test.sh basic install validation test/_global/ scenarios.json global test scenarios (all-tools + per-feature version pins) all-tools.sh smoke test verifying every feature binary works -specific-version.sh version-pinned test
CI_WORKFLOWS: YAML<<
- file: ".github/workflows/test.yaml" purpose: "Matrix tests each feature against debian:latest, ubuntu:latest, mcr.microsoft.com/devcontainers/base:ubuntu; also runs global scenarios"
- file: ".github/workflows/release.yaml" purpose: "Manually triggered; publishes features to GHCR and opens a docs PR"
TEST_PREREQUISITE: "npm install -g @devcontainers/cli"
TEST_COMMANDS: TEXT<< devcontainer features test -f -i ubuntu:latest make test-matrix feature= make test devcontainer features test --global-scenarios-only --filter .
INSTALL_SH_STEPS: TEXT<<
- Shebang: #!/usr/bin/env bash with set -e or set -euo pipefail
- Root check: exit 1 if $(id -u) is not 0
- Clean up: rm -rf /var/lib/apt/lists/*
- check_packages helper: install apt deps if missing
- Install deps: curl jq ca-certificates tar
- get_latest_version: query GitHub API /repos/OWNER/REPO/releases/latest
- Version resolution: if empty or "latest" call get_latest_version
- Architecture: uname -m with case for x86_64, i686, aarch64, armv7l
- OS: uname -s mapped to unknown-linux-gnu or apple-darwin
- Download URL: construct from owner/repo/version/arch/os
- Temp dir: mktemp -d, cd, curl -sSL, extract
- Move: mv binary to /usr/local/bin/
- Cleanup: rm -rf temp dir and apt lists
- Verify: run binary --version
TEST_PATTERN: TEXT<< #!/bin/bash set -e source dev-container-features-test-lib check "" reportResults
VERSION_TEST_PATTERN: TEXT<< #!/bin/bash set -e source dev-container-features-test-lib check " with specific version" /bin/bash -c " --version | grep ''" reportResults
DELIVERABLES_CREATE: YAML<<
- path: "src//devcontainer-feature.json" purpose: "Feature metadata with id, name, version 1.0.0, description, options.version default latest"
- path: "src//install.sh" purpose: "Installer script following INSTALL_SH_STEPS"
- path: "test//test.sh" purpose: "Basic smoke test"
- path: "test/_global/-specific-version.sh" purpose: "Version-pinned test"
DELIVERABLES_UPDATE: YAML<<
- path: "test/_global/all-tools.sh" action: "Add a check line for the new binary before reportResults"
- path: "test/_global/scenarios.json" action: "Add feature to all-tools.features and add a version-pinned scenario"
- path: ".github/workflows/test.yaml" action: "Add feature id to matrix.features array"
- path: "README.md" action: "Add row to features table and add usage section"