Skip to content

Commit

Permalink
yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ridhwaans committed Mar 8, 2024
1 parent 7191fa5 commit 43bca58
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 54 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "mcr.microsoft.com/devcontainers/javascript-node",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
Expand All @@ -14,4 +14,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: alpine-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
test-autogenerated:
runs-on: alpine-latest
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
Expand All @@ -28,7 +28,7 @@ jobs:
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .

test-scenarios:
runs-on: alpine-latest
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
Expand All @@ -44,7 +44,7 @@ jobs:
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated --skip-duplicated .

test-global:
runs-on: alpine-latest
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/validate.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ windows

| development image | supported-features |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| [javascript-node](https://hub.docker.com/_/microsoft-devcontainers-javascript-node) | [docker-in-docker](https://github.com/devcontainers/features/pkgs/container/features%2Fdocker-in-docker) |
| [javascript-node:20](https://hub.docker.com/_/microsoft-devcontainers-javascript-node) | [docker-in-docker](https://github.com/devcontainers/features/pkgs/container/features%2Fdocker-in-docker) |

in VS Code, select `Dev Containers: Reopen in Container`, or
`Dev Containers: Rebuild Without Cache and Reopen in Container`
Expand All @@ -28,7 +28,7 @@ in VS Code, select `Dev Containers: Reopen in Container`, or

| runner image |
|--------------------------------------------------|
| [alpine-latest](https://hub.docker.com/_/alpine) |
| [ubuntu-22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |

### base scenario
> devcontainer features test --features base --skip-autogenerated --skip-duplicated
Expand All @@ -39,7 +39,7 @@ in VS Code, select `Dev Containers: Reopen in Container`, or

| runner image |
|--------------------------------------------------|
| [alpine-latest](https://hub.docker.com/_/alpine) |
| [ubuntu-22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |

### all features
> devcontainer features publish
Expand Down
9 changes: 2 additions & 7 deletions src/base/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
"default": "automatic",
"description": "Enter the name of a non-root user to configure or 'none' to skip"
},
"setTheme": {
"type": "boolean",
"default": true,
"description": "Apply theme to vim and zsh"
},
"userUid": {
"type": "string",
"default": "automatic",
Expand Down Expand Up @@ -52,12 +47,12 @@
},
"vimplugPath": {
"type": "string",
"default": "/usr/local/share/.vim/bundle",
"default": "/usr/local/share/vim/bundle",
"description": "Vim Plugin Manager Install Path"
},
"zshplugPath": {
"type": "string",
"default": "/usr/local/share/.zsh/bundle",
"default": "/usr/local/share/zsh/bundle",
"description": "Zsh Plugin Manager Install Path"
},
"javaVersion": {
Expand Down
2 changes: 1 addition & 1 deletion src/base/modules/common-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ EOF

if [ "${UPDATE_RC}" = "true" ]; then
updaterc "vim" "${vim_rc_snippet}"
vim +silent! +PlugInstall +qall
vim +silent! +PlugInstall +PlugClean +qall
fi

echo "Done!"
2 changes: 1 addition & 1 deletion src/base/modules/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ else
else
curl -L https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip --create-dirs -o /tmp/aws-sam-cli-linux-x86_64.zip && cd $(dirname $_)
unzip aws-sam-cli-linux-x86_64.zip -d sam-installation
./sam-installation/install
./sam-installation/install --update
rm -rf sam-installation
rm -rf aws-sam-cli-linux-x86_64.zip
fi
Expand Down
1 change: 0 additions & 1 deletion test/base/common_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ check "jq" jq --version
check "curl" curl --version
check "git" git --version
check "zsh" zsh --version
check "ps" ps --version

# Report result
reportResults
16 changes: 16 additions & 0 deletions test/base/first_user.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

# Definition specific tests
FIRST_USER=$(id -nu 1000)
check "first user should be vscode" echo $FIRST_USER | grep "vscode"
check "user timezone should be UTC" echo $(date +%Z) | grep "UTC"
check "user lang should be UTF-8" echo $LANG | grep "en_US.UTF-8"
check "user shell should be zsh" sudo grep "^$FIRST_USER:" /etc/passwd | cut -d: -f7 | grep "zsh"

# Report result
reportResults
6 changes: 4 additions & 2 deletions test/base/manager_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib

check "should be logged in as the provided user" echo $LOGNAME | grep "vscode"

source ~/.zshrc

# Check plugin managers
check "check for zplug" zplug --version
VIMPLUG_PATH="/usr/local/share/vim/bundle"
check "check for vim-plug" ls -1 $VIMPLUG_PATH/autoload/plug.vim | wc -l

source /etc/zsh/zshrc

# Check language managers
check "check for nvm" nvm --version
check "check for sdkman" sdk version
Expand Down
16 changes: 0 additions & 16 deletions test/base/non_root_user_default_shell.sh

This file was deleted.

3 changes: 2 additions & 1 deletion test/base/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
"base": {}
}
},
"non_root_user_default_shell": {
"first_user": {
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"base": {}
}
},
"manager_versions": {
"image": "mcr.microsoft.com/devcontainers/base:debian",
"remoteUser": "vscode",
"features": {
"base": {}
}
Expand Down

0 comments on commit 43bca58

Please sign in to comment.