Skip to content

Commit

Permalink
switch cli from local to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhikhandale authored Jul 15, 2022
1 parent eb225a0 commit c851e6d
Show file tree
Hide file tree
Showing 56 changed files with 10 additions and 16 deletions.
12 changes: 3 additions & 9 deletions .github/actions/smoke-test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ IMAGE="$1"
set -e

export DOCKER_BUILDKIT=1
echo "(*) Pulling latest '@devcontainer/cli"
# npm install -g @devcontainers/cli

#Temporarily installing cli from source until https://github.com/devcontainers/cli/pull/6 is merged
cd build
chmod +x devcontainers-cli-0.6.4.tgz
echo "(*) Installing @devcontainer/[email protected]"
npm install -g @devcontainers/[email protected]

echo "(*) Building image - ${IMAGE}"
npx --yes devcontainers-cli-0.6.4.tgz up --workspace-folder ../src/${IMAGE}
# devcontainer build --workspace-folder "src/${IMAGE}/" --image-name vsc-${IMAGE}

devcontainer up --workspace-folder "src/${IMAGE}/"
4 changes: 1 addition & 3 deletions .github/actions/smoke-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ set -e

# Run actual test
echo "(*) Running test..."
cd build
chmod +x devcontainers-cli-0.6.4.tgz

npx --yes devcontainers-cli-0.6.4.tgz exec --workspace-folder $(pwd)/../src/$IMAGE /bin/sh -c 'set -e && if [ -f "test-project/test.sh" ]; then cd test-project && if [ "$(id -u)" = "0" ]; then chmod +x test.sh; else sudo chmod +x test.sh; fi && ./test.sh; else ls -a; fi'
devcontainer exec --workspace-folder $(pwd)/src/$IMAGE /bin/sh -c 'set -e && if [ -f "test-project/test.sh" ]; then cd test-project && if [ "$(id -u)" = "0" ]; then chmod +x test.sh; else sudo chmod +x test.sh; fi && ./test.sh; else ls -a; fi'

# Clean up
docker stop $(docker container ls -q)
1 change: 1 addition & 0 deletions .github/workflows/push-again.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
# Setup build CLI
cd "$GITHUB_WORKSPACE/ref"
yarn install
npm install -g @devcontainers/[email protected]
# Go to the release, symlink the build tool from ref since this is the version for the workflow
cd "$GITHUB_WORKSPACE/release"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
# Build and push dev images
yarn install
npm install -g @devcontainers/cli
npm install -g @devcontainers/cli@0.8.0
GIT_BRANCH=$(echo "${{ github.ref }}" | grep -oP 'refs/(heads|tags)/\K(.+)')
if [ "$GIT_BRANCH" == "" ]; then
GIT_BRANCH=main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
# Build and push images
yarn install
npm install -g @devcontainers/cli
npm install -g @devcontainers/cli@0.8.0
build/vscdc push --page ${{ matrix.page }} \
--pageTotal ${{ matrix.page-total }} \
--release v0.0.1 \
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
.tgz
Binary file removed build/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed build/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed build/devcontainers-cli-0.6.4.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/src/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async function pushImage(definitionId, repo, release, updateLatest,
}

const spawnOpts = { stdio: 'inherit', cwd: workingDir, shell: true };
await asyncUtils.spawn('npx --yes devcontainers-cli-0.6.4.tgz', [
await asyncUtils.spawn('devcontainer', [
'build',
'--workspace-folder', definitionPath,
'--log-level ', 'info',
Expand Down
Binary file removed src/alpine/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/alpine/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/alpine/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/anaconda/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/anaconda/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/anaconda/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/codespaces/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/codespaces/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/codespaces/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/cpp/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/cpp/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/cpp/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Empty file modified src/cpp/test-project/test.sh
100644 → 100755
Empty file.
Binary file removed src/debian/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/debian/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/debian/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/dotnet/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/dotnet/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/dotnet/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/go/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/go/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/go/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/java/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/java/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/java/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/jekyll/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/jekyll/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/jekyll/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/miniconda/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/miniconda/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/miniconda/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/php/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/php/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/php/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/python/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/python/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/python/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/ruby/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/ruby/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/ruby/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/rust/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/rust/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/rust/devcontainers-cli-0.6.4.tgz
Binary file not shown.
Binary file removed src/ubuntu/devcontainers-cli-0.6.0.tgz
Binary file not shown.
Binary file removed src/ubuntu/devcontainers-cli-0.6.3.tgz
Binary file not shown.
Binary file removed src/ubuntu/devcontainers-cli-0.6.4.tgz
Binary file not shown.

0 comments on commit c851e6d

Please sign in to comment.