Skip to content

Commit

Permalink
add pack-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
audacioustux committed Oct 31, 2023
1 parent a319006 commit 40c00e8
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- vegeta
- knative
- ebort
- pack-cli
steps:
- uses: actions/checkout@v3
- name: "Install latest devcontainer CLI"
Expand Down
Empty file modified src/graalvm/install.sh
100644 → 100755
Empty file.
8 changes: 8 additions & 0 deletions src/pack-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "pack-cli",
"version": "1.0.0",
"name": "Buildpacks Pack CLI",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
17 changes: 17 additions & 0 deletions src/pack-cli/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -eax

apt-get update -qq
apt-get install -yqq --no-install-recommends software-properties-common

add-apt-repository ppa:cncf-buildpacks/pack-cli -y
apt-get install pack-cli

sudo -E -u $_REMOTE_USER bash <<EOF
pack config default-builder paketobuildpacks/builder-jammy-base
EOF

# cleanup
apt-get clean
rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion src/scala-toolchain/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "scala-toolchain",
"version": "1.0.1",
"version": "1.0.2",
"name": "Scala Toolchain",
"options": {
"version": {
Expand Down
2 changes: 1 addition & 1 deletion src/scala-toolchain/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ fi
chmod +x cs
install -o root -g root -m 0755 cs /usr/local/bin/cs

sudo -E -u $_REMOTE_USER bash <<EOF
sudo -E -u $_REMOTE_USER zsh <<EOF
cs setup -y -q
EOF
17 changes: 17 additions & 0 deletions test/pack-cli/available_for_nonroot_user.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -e

source dev-container-features-test-lib

check "user is vscode" grep vscode <(whoami)

bins=(
pack
)

for bin in "${bins[@]}"; do
check "$bin" command -v "$bin"
done

reportResults
12 changes: 12 additions & 0 deletions test/pack-cli/scenarios.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"available_for_nonroot_user": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "vscode"
},
"pack-cli": {}
}
}
}

0 comments on commit 40c00e8

Please sign in to comment.