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
27 changes: 20 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
- archlinux:multilib-devel
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Setup Node.js"
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
- name: "Install Dependencies"
run: yarn global add @devcontainers/cli
run: yarn install

- name: "Generating tests for '${{ matrix.feature }}' against '${{ matrix.base-image }}'"
run: make FEATURES=${{ matrix.feature }} BASE_IMAGE=${{ matrix.base-image }} test-autogenerated
Expand All @@ -37,9 +40,12 @@ jobs:
feature: ${{fromJson(vars.FEATURES_JSON)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Setup Node.js"
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
- name: "Install Dependencies"
run: yarn global add @devcontainers/cli
run: yarn install

- name: "Generating tests for '${{ matrix.feature }}' scenarios"
run: make FEATURES=${{ matrix.feature }} test-scenarios
Expand All @@ -48,9 +54,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Setup Node.js"
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
- name: "Install Dependencies"
run: yarn global add @devcontainers/cli
run: yarn install

- name: "Testing global scenarios"
run: make test-global
Expand All @@ -68,7 +77,11 @@ jobs:
with:
fetch-depth: 0
- name: Setup Node.js
uses: bartventer/devcontainer-images/.github/actions/setup-node@c698f9d771b2a0a838a6b0c5f2cbb2ea673256d5 # v2.3.1
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
cache: yarn
cache-dependency-path: yarn.lock
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FEATURES_FILTER ?= ## Filter for features. Default: empty. Change this in the Ma
PRESERVE_TESTCONTAINERS ?= false ## Preserve test containers. Default: false. Change this in the Makefile or in the environment.

# Devcontainer command
DC=devcontainer
DC=yarn devcontainer
DC_TEST=$(DC) features test

# Devcontainer flags
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"node": ">=22.3.0"
},
"dependencies": {
"@devcontainers/cli": "^0.76.0",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/github": "^10.0.6",
"@semantic-release/release-notes-generator": "^14.0.1",
"semantic-release": "24.0.0"
}
}
}
46 changes: 5 additions & 41 deletions src/aws-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,50 +201,14 @@ install_sam() {
# ** Utility functions **
# ***********************

_UTIL_SCRIPT="/usr/local/bin/archlinux_util.sh"
if [ ! -x "$_UTIL_SCRIPT" ]; then
(
_TMP_DIR=$(mktemp --directory --suffix=arch-devcontainer)
echo ":: Downloading release tar..."
_TAG_NAME=$(curl --silent "https://api.github.com/repos/bartventer/arch-devcontainer-features/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
_BASE_URL="https://github.com/bartventer/arch-devcontainer-features/releases/download/$_TAG_NAME"
_TARFILE="arch-devcontainer-features-$_TAG_NAME.tar.gz"
curl -sSL -o "$_TMP_DIR/${_TARFILE}" "$_BASE_URL/$_TARFILE"
curl -sSL -o "$_TMP_DIR/checksums.txt" "$_BASE_URL/checksums.txt"
curl -sSL -o "$_TMP_DIR/checksums.txt.asc" "$_BASE_URL/checksums.txt.asc"
echo "OK"

echo ":: Importing GPG key..."
_REPO_GPG_KEY=A080EEF8607B049ED39BE8F6077F8B92C2B891F9
gpg --keyserver keyserver.ubuntu.com --recv-keys "$_REPO_GPG_KEY"
echo "OK"

echo ":: Verifying checksums signature..."
cd "$_TMP_DIR"
gpg --verify checksums.txt.asc checksums.txt
echo "OK"

echo ":: Verifying checksums..."
sha256sum -c checksums.txt
echo "OK"

echo ":: Extracting tar..."
tar xzf "$_TMP_DIR/$_TARFILE" -C "$_TMP_DIR"
echo "OK"

echo ":: Moving scripts..."
mv ./scripts/archlinux_util.sh "$_UTIL_SCRIPT"
chmod +x "$_UTIL_SCRIPT"
echo "OK"

# Clean up
rm -rf "$_TMP_DIR"
)
fi
_UTILS_SETUP_SCRIPT=$(mktemp)
curl -sSL -o "$_UTILS_SETUP_SCRIPT" https://raw.githubusercontent.com/bartventer/arch-devcontainer-features/main/scripts/archlinux_util_setup.sh
sh "$_UTILS_SETUP_SCRIPT"
rm -f "$_UTILS_SETUP_SCRIPT"

# shellcheck disable=SC1091
# shellcheck source=scripts/archlinux_util.sh
. "$_UTIL_SCRIPT"
. archlinux_util.sh

# ==========
# == Main ==
Expand Down
46 changes: 5 additions & 41 deletions src/azure-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,50 +36,14 @@ install_azure_cli() {
# ** Utility functions **
# ***********************

_UTIL_SCRIPT="/usr/local/bin/archlinux_util.sh"
if [ ! -x "$_UTIL_SCRIPT" ]; then
(
_TMP_DIR=$(mktemp --directory --suffix=arch-devcontainer)
echo ":: Downloading release tar..."
_TAG_NAME=$(curl --silent "https://api.github.com/repos/bartventer/arch-devcontainer-features/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
_BASE_URL="https://github.com/bartventer/arch-devcontainer-features/releases/download/$_TAG_NAME"
_TARFILE="arch-devcontainer-features-$_TAG_NAME.tar.gz"
curl -sSL -o "$_TMP_DIR/${_TARFILE}" "$_BASE_URL/$_TARFILE"
curl -sSL -o "$_TMP_DIR/checksums.txt" "$_BASE_URL/checksums.txt"
curl -sSL -o "$_TMP_DIR/checksums.txt.asc" "$_BASE_URL/checksums.txt.asc"
echo "OK"

echo ":: Importing GPG key..."
_REPO_GPG_KEY=A080EEF8607B049ED39BE8F6077F8B92C2B891F9
gpg --keyserver keyserver.ubuntu.com --recv-keys "$_REPO_GPG_KEY"
echo "OK"

echo ":: Verifying checksums signature..."
cd "$_TMP_DIR"
gpg --verify checksums.txt.asc checksums.txt
echo "OK"

echo ":: Verifying checksums..."
sha256sum -c checksums.txt
echo "OK"

echo ":: Extracting tar..."
tar xzf "$_TMP_DIR/$_TARFILE" -C "$_TMP_DIR"
echo "OK"

echo ":: Moving scripts..."
mv ./scripts/archlinux_util.sh "$_UTIL_SCRIPT"
chmod +x "$_UTIL_SCRIPT"
echo "OK"

# Clean up
rm -rf "$_TMP_DIR"
)
fi
_UTILS_SETUP_SCRIPT=$(mktemp)
curl -sSL -o "$_UTILS_SETUP_SCRIPT" https://raw.githubusercontent.com/bartventer/arch-devcontainer-features/main/scripts/archlinux_util_setup.sh
sh "$_UTILS_SETUP_SCRIPT"
rm -f "$_UTILS_SETUP_SCRIPT"

# shellcheck disable=SC1091
# shellcheck source=scripts/archlinux_util.sh
. "$_UTIL_SCRIPT"
. archlinux_util.sh

# ==========
# == Main ==
Expand Down
46 changes: 5 additions & 41 deletions src/common-utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,50 +35,14 @@ MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
# ** Utility functions **
# ***********************

_UTIL_SCRIPT="/usr/local/bin/archlinux_util.sh"
if [ ! -x "$_UTIL_SCRIPT" ]; then
(
_TMP_DIR=$(mktemp --directory --suffix=arch-devcontainer)
echo ":: Downloading release tar..."
_TAG_NAME=$(curl --silent "https://api.github.com/repos/bartventer/arch-devcontainer-features/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
_BASE_URL="https://github.com/bartventer/arch-devcontainer-features/releases/download/$_TAG_NAME"
_TARFILE="arch-devcontainer-features-$_TAG_NAME.tar.gz"
curl -sSL -o "$_TMP_DIR/${_TARFILE}" "$_BASE_URL/$_TARFILE"
curl -sSL -o "$_TMP_DIR/checksums.txt" "$_BASE_URL/checksums.txt"
curl -sSL -o "$_TMP_DIR/checksums.txt.asc" "$_BASE_URL/checksums.txt.asc"
echo "OK"

echo ":: Importing GPG key..."
_REPO_GPG_KEY=A080EEF8607B049ED39BE8F6077F8B92C2B891F9
gpg --keyserver keyserver.ubuntu.com --recv-keys "$_REPO_GPG_KEY"
echo "OK"

echo ":: Verifying checksums signature..."
cd "$_TMP_DIR"
gpg --verify checksums.txt.asc checksums.txt
echo "OK"

echo ":: Verifying checksums..."
sha256sum -c checksums.txt
echo "OK"

echo ":: Extracting tar..."
tar xzf "$_TMP_DIR/$_TARFILE" -C "$_TMP_DIR"
echo "OK"

echo ":: Moving scripts..."
mv ./scripts/archlinux_util.sh "$_UTIL_SCRIPT"
chmod +x "$_UTIL_SCRIPT"
echo "OK"

# Clean up
rm -rf "$_TMP_DIR"
)
fi
_UTILS_SETUP_SCRIPT=$(mktemp)
curl -sSL -o "$_UTILS_SETUP_SCRIPT" https://raw.githubusercontent.com/bartventer/arch-devcontainer-features/main/scripts/archlinux_util_setup.sh
sh "$_UTILS_SETUP_SCRIPT"
rm -f "$_UTILS_SETUP_SCRIPT"

# shellcheck disable=SC1091
# shellcheck source=scripts/archlinux_util.sh
. "$_UTIL_SCRIPT"
. archlinux_util.sh

# shellcheck disable=SC1091
. /etc/os-release
Expand Down
46 changes: 5 additions & 41 deletions src/docker-in-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,50 +28,14 @@ fi
# ** Utility functions **
# ***********************

_UTIL_SCRIPT="/usr/local/bin/archlinux_util.sh"
if [ ! -x "$_UTIL_SCRIPT" ]; then
(
_TMP_DIR=$(mktemp --directory --suffix=arch-devcontainer)
echo ":: Downloading release tar..."
_TAG_NAME=$(curl --silent "https://api.github.com/repos/bartventer/arch-devcontainer-features/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
_BASE_URL="https://github.com/bartventer/arch-devcontainer-features/releases/download/$_TAG_NAME"
_TARFILE="arch-devcontainer-features-$_TAG_NAME.tar.gz"
curl -sSL -o "$_TMP_DIR/${_TARFILE}" "$_BASE_URL/$_TARFILE"
curl -sSL -o "$_TMP_DIR/checksums.txt" "$_BASE_URL/checksums.txt"
curl -sSL -o "$_TMP_DIR/checksums.txt.asc" "$_BASE_URL/checksums.txt.asc"
echo "OK"

echo ":: Importing GPG key..."
_REPO_GPG_KEY=A080EEF8607B049ED39BE8F6077F8B92C2B891F9
gpg --keyserver keyserver.ubuntu.com --recv-keys "$_REPO_GPG_KEY"
echo "OK"

echo ":: Verifying checksums signature..."
cd "$_TMP_DIR"
gpg --verify checksums.txt.asc checksums.txt
echo "OK"

echo ":: Verifying checksums..."
sha256sum -c checksums.txt
echo "OK"

echo ":: Extracting tar..."
tar xzf "$_TMP_DIR/$_TARFILE" -C "$_TMP_DIR"
echo "OK"

echo ":: Moving scripts..."
mv ./scripts/archlinux_util.sh "$_UTIL_SCRIPT"
chmod +x "$_UTIL_SCRIPT"
echo "OK"

# Clean up
rm -rf "$_TMP_DIR"
)
fi
_UTILS_SETUP_SCRIPT=$(mktemp)
curl -sSL -o "$_UTILS_SETUP_SCRIPT" https://raw.githubusercontent.com/bartventer/arch-devcontainer-features/main/scripts/archlinux_util_setup.sh
sh "$_UTILS_SETUP_SCRIPT"
rm -f "$_UTILS_SETUP_SCRIPT"

# shellcheck disable=SC1091
# shellcheck source=scripts/archlinux_util.sh
. "$_UTIL_SCRIPT"
. archlinux_util.sh

# Setup STDERR.
err() {
Expand Down
46 changes: 5 additions & 41 deletions src/docker-outside-of-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,50 +31,14 @@ fi
# ** Utility functions **
# ***********************

_UTIL_SCRIPT="/usr/local/bin/archlinux_util.sh"
if [ ! -x "$_UTIL_SCRIPT" ]; then
(
_TMP_DIR=$(mktemp --directory --suffix=arch-devcontainer)
echo ":: Downloading release tar..."
_TAG_NAME=$(curl --silent "https://api.github.com/repos/bartventer/arch-devcontainer-features/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
_BASE_URL="https://github.com/bartventer/arch-devcontainer-features/releases/download/$_TAG_NAME"
_TARFILE="arch-devcontainer-features-$_TAG_NAME.tar.gz"
curl -sSL -o "$_TMP_DIR/${_TARFILE}" "$_BASE_URL/$_TARFILE"
curl -sSL -o "$_TMP_DIR/checksums.txt" "$_BASE_URL/checksums.txt"
curl -sSL -o "$_TMP_DIR/checksums.txt.asc" "$_BASE_URL/checksums.txt.asc"
echo "OK"

echo ":: Importing GPG key..."
_REPO_GPG_KEY=A080EEF8607B049ED39BE8F6077F8B92C2B891F9
gpg --keyserver keyserver.ubuntu.com --recv-keys "$_REPO_GPG_KEY"
echo "OK"

echo ":: Verifying checksums signature..."
cd "$_TMP_DIR"
gpg --verify checksums.txt.asc checksums.txt
echo "OK"

echo ":: Verifying checksums..."
sha256sum -c checksums.txt
echo "OK"

echo ":: Extracting tar..."
tar xzf "$_TMP_DIR/$_TARFILE" -C "$_TMP_DIR"
echo "OK"

echo ":: Moving scripts..."
mv ./scripts/archlinux_util.sh "$_UTIL_SCRIPT"
chmod +x "$_UTIL_SCRIPT"
echo "OK"

# Clean up
rm -rf "$_TMP_DIR"
)
fi
_UTILS_SETUP_SCRIPT=$(mktemp)
curl -sSL -o "$_UTILS_SETUP_SCRIPT" https://raw.githubusercontent.com/bartventer/arch-devcontainer-features/main/scripts/archlinux_util_setup.sh
sh "$_UTILS_SETUP_SCRIPT"
rm -f "$_UTILS_SETUP_SCRIPT"

# shellcheck disable=SC1091
# shellcheck source=scripts/archlinux_util.sh
. "$_UTIL_SCRIPT"
. archlinux_util.sh

# Source /etc/os-release to get OS info
# shellcheck disable=SC1091
Expand Down
Loading