Skip to content

Commit

Permalink
add aws sam
Browse files Browse the repository at this point in the history
  • Loading branch information
audacioustux committed Jan 8, 2024
1 parent ebef317 commit 62f6071
Show file tree
Hide file tree
Showing 7 changed files with 59 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 @@ -49,6 +49,7 @@ jobs:
- ebort
- pack-cli
- mirrord
- aws-sam-cli
steps:
- uses: actions/checkout@v3
- name: "Install latest devcontainer CLI"
Expand Down
9 changes: 9 additions & 0 deletions src/aws-sam-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "AWS SAM CLI",
"id": "aws-sam-cli",
"version": "1.0.0",
"description": "SAM CLI with ARM64 support",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
19 changes: 19 additions & 0 deletions src/aws-sam-cli/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -eax

ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then ARCH=arm64; fi

install_sam_cli(){
echo "Installing AWS SAM cli..."

local artifact="aws-sam-cli-linux-${ARCH?}.zip"

curl -sLO "https://github.com/aws/aws-sam-cli/releases/latest/download/$artifact"

unzip $artifact
./install
}

install_sam_cli
2 changes: 1 addition & 1 deletion src/knative/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Knative",
"id": "knative",
"version": "1.0.0",
"version": "1.0.1",
"description": "Installs Knative CLI (kn and kn func)",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
Expand Down
1 change: 0 additions & 1 deletion src/knative/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ install_knative_func_cli(){
echo "Installing knative func cli..."

local artifact="func_linux_${ARCH?}"
local version="1.11.0"

curl -sLO "https://github.com/knative/func/releases/latest/download/$artifact"

Expand Down
17 changes: 17 additions & 0 deletions test/aws-sam-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=(
sam
)

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

reportResults
12 changes: 12 additions & 0 deletions test/aws-sam-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"
},
"aws-sam-cli": {}
}
}
}

0 comments on commit 62f6071

Please sign in to comment.