From bdb670e8523b534fe6119e1e83d30f3d9e076811 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 3 Jun 2020 12:07:42 -0400 Subject: [PATCH] Rename container and release-container to images and release-image --- .github/workflows/ci.yaml | 16 ++++++++-------- .github/workflows/publish.yaml | 4 ++-- ci/README.md | 10 +++++----- ci/build/test-standalone-release.sh | 2 +- ci/dev/fmt.sh | 2 ++ ci/dev/lint.sh | 2 +- .../centos => images/centos:7}/Dockerfile | 0 ci/{container => images/debian:8}/Dockerfile | 0 .../Dockerfile | 0 ci/{release-container => release-image}/build.sh | 2 +- ci/steps/build-docker-image.sh | 2 +- ci/steps/release-packages.sh | 2 +- doc/CONTRIBUTING.md | 12 +++++++++++- doc/npm.md | 8 ++++++++ 14 files changed, 41 insertions(+), 21 deletions(-) rename ci/{container/centos => images/centos:7}/Dockerfile (100%) rename ci/{container => images/debian:8}/Dockerfile (100%) rename ci/{release-container => release-image}/Dockerfile (100%) rename ci/{release-container => release-image}/build.sh (85%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f3f3e72c..03bd00b0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Run ./ci/steps/fmt.sh - uses: ./ci/container + uses: ./ci/images/debian:8 with: args: ./ci/steps/fmt.sh @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Run ./ci/steps/lint.sh - uses: ./ci/container + uses: ./ci/images/debian:8 with: args: ./ci/steps/lint.sh @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Run ./ci/steps/test.sh - uses: ./ci/container + uses: ./ci/images/debian:8 with: args: ./ci/steps/test.sh @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Run ./ci/steps/release.sh - uses: ./ci/container + uses: ./ci/images/debian:8 with: args: ./ci/steps/release.sh - name: Upload npm package artifact @@ -55,7 +55,7 @@ jobs: name: npm-package path: ./release-npm-package - name: Run ./ci/steps/release-packages.sh - uses: ./ci/container/centos + uses: ./ci/images/centos:7 with: args: ./ci/steps/release-packages.sh - name: Upload release artifacts @@ -75,7 +75,7 @@ jobs: name: npm-package path: ./release-npm-package - name: Run ./ci/steps/release-packages.sh - uses: ./ci/container/centos + uses: ./ci/images/centos:7 with: args: ./ci/steps/release-packages.sh - name: Upload release artifacts @@ -116,7 +116,7 @@ jobs: name: release-packages path: ./release-packages - name: Run ./ci/steps/build-docker-image.sh - uses: ./ci/container + uses: ./ci/images/debian:8 with: args: ./ci/steps/build-docker-image.sh - name: Upload release image @@ -136,7 +136,7 @@ jobs: name: release-packages path: ./release-packages - name: Run ./ci/steps/build-docker-image.sh - uses: ./ci/container/arm64 + uses: ./ci/images/debian:8 with: args: ./ci/steps/build-docker-image.sh - name: Upload release image diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2bb7df09..0eede125 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Run ./ci/steps/publish-npm.sh - uses: ./ci/container + uses: ./ci/images/debian:8 with: args: ./ci/steps/publish-npm.sh env: @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Run ./ci/steps/push-docker-manifest.sh - uses: ./ci/container + uses: ./ci/images/debian:8 with: args: ./ci/steps/push-docker-manifest.sh env: diff --git a/ci/README.md b/ci/README.md index 4ab6da56..38fb3d27 100644 --- a/ci/README.md +++ b/ci/README.md @@ -104,17 +104,17 @@ You can disable minification by setting `MINIFY=`. - Post install script for the npm package. - Bundled by`yarn release`. -## release-container +## release-image -This directory contains the release docker container. +This directory contains the release docker container image. -- [./release-container/build.sh](./release-container/build.sh) +- [./release-image/build.sh](./release-image/build.sh) - Builds the release container with the tag `codercom/code-server-$ARCH:$VERSION`. - Assumes debian releases are ready in `./release-packages`. -## container +## images -This directory contains the container for CI. +This directory contains the images for CI. ## steps diff --git a/ci/build/test-standalone-release.sh b/ci/build/test-standalone-release.sh index 488a057a..0d7010a2 100755 --- a/ci/build/test-standalone-release.sh +++ b/ci/build/test-standalone-release.sh @@ -15,7 +15,7 @@ main() { ./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python local installed_extensions installed_extensions="$(./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)" - if [[ "$installed_extensions" != "info Using config file ~/.config/code-server/config.yaml + if [[ $installed_extensions != "info Using config file ~/.config/code-server/config.yaml ms-python.python" ]]; then echo "Unexpected output from listing extensions:" echo "$installed_extensions" diff --git a/ci/dev/fmt.sh b/ci/dev/fmt.sh index d7ebdbbf..b619a7e4 100755 --- a/ci/dev/fmt.sh +++ b/ci/dev/fmt.sh @@ -24,6 +24,8 @@ main() { doctoc --title '# FAQ' doc/FAQ.md > /dev/null doctoc --title '# Setup Guide' doc/guide.md > /dev/null doctoc --title '# Install' doc/install.md > /dev/null + doctoc --title '# npm Install Requirements' doc/npm.md > /dev/null + doctoc --title '# Contributing' doc/CONTRIBUTING.md > /dev/null if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then echo "Files need generation or are formatted incorrectly:" diff --git a/ci/dev/lint.sh b/ci/dev/lint.sh index f9f54202..72de463e 100755 --- a/ci/dev/lint.sh +++ b/ci/dev/lint.sh @@ -7,7 +7,7 @@ main() { eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js") stylelint $(git ls-files "*.css") tsc --noEmit - # See comment in ./ci/container/Dockerfile + # See comment in ./ci/image/debian:8 if [[ ! ${CI-} ]]; then shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090 $(git ls-files "*.sh") fi diff --git a/ci/container/centos/Dockerfile b/ci/images/centos:7/Dockerfile similarity index 100% rename from ci/container/centos/Dockerfile rename to ci/images/centos:7/Dockerfile diff --git a/ci/container/Dockerfile b/ci/images/debian:8/Dockerfile similarity index 100% rename from ci/container/Dockerfile rename to ci/images/debian:8/Dockerfile diff --git a/ci/release-container/Dockerfile b/ci/release-image/Dockerfile similarity index 100% rename from ci/release-container/Dockerfile rename to ci/release-image/Dockerfile diff --git a/ci/release-container/build.sh b/ci/release-image/build.sh similarity index 85% rename from ci/release-container/build.sh rename to ci/release-image/build.sh index e91ea33c..5969e15a 100755 --- a/ci/release-container/build.sh +++ b/ci/release-image/build.sh @@ -5,7 +5,7 @@ main() { cd "$(dirname "$0")/../.." source ./ci/lib.sh - docker build -t "codercom/code-server-$ARCH:$VERSION" -f ./ci/release-container/Dockerfile . + docker build -t "codercom/code-server-$ARCH:$VERSION" -f ./ci/release-image/Dockerfile . } main "$@" diff --git a/ci/steps/build-docker-image.sh b/ci/steps/build-docker-image.sh index 692fa40f..16653a0e 100755 --- a/ci/steps/build-docker-image.sh +++ b/ci/steps/build-docker-image.sh @@ -5,7 +5,7 @@ main() { cd "$(dirname "$0")/../.." source ./ci/lib.sh - ./ci/release-container/build.sh + ./ci/release-image/build.sh mkdir -p release-images docker save "codercom/code-server-$ARCH:$VERSION" > "release-images/code-server-$ARCH-$VERSION.tar" diff --git a/ci/steps/release-packages.sh b/ci/steps/release-packages.sh index cdfcf914..39c51063 100755 --- a/ci/steps/release-packages.sh +++ b/ci/steps/release-packages.sh @@ -4,7 +4,7 @@ set -euo pipefail main() { cd "$(dirname "$0")/../.." - if [[ "$OSTYPE" == darwin* ]]; then + if [[ $OSTYPE == darwin* ]]; then curl -L https://nodejs.org/dist/v14.4.0/node-v14.4.0-darwin-x64.tar.gz | tar -xz PATH="$PATH:node-v14.4.0-darwin-x64/bin" fi diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 5e3f689c..9e4a1d5e 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -1,5 +1,15 @@ + + # Contributing +- [Requirements](#requirements) +- [Development Workflow](#development-workflow) +- [Build](#build) +- [Structure](#structure) + - [VS Code Patch](#vs-code-patch) + + + - [Detailed CI and build process docs](../ci) ## Requirements @@ -11,7 +21,7 @@ Differences: - We require a minimum of node v12 but later versions should work. - We use [fnpm](https://github.com/goreleaser/nfpm) to build `.deb` and `.rpm` packages. - We use [jq](https://stedolan.github.io/jq/) to build code-server releases. -- The [CI container](../ci/container/Dockerfile) is a useful reference for all our dependencies. +- The [CI container](../ci/images/debian:8/Dockerfile) is a useful reference for all our dependencies. ## Development Workflow diff --git a/doc/npm.md b/doc/npm.md index a612ba8c..f4d0ee09 100644 --- a/doc/npm.md +++ b/doc/npm.md @@ -1,5 +1,13 @@ + + # npm Install Requirements +- [Ubuntu, Debian](#ubuntu-debian) +- [Fedora, CentOS, RHEL](#fedora-centos-rhel) +- [macOS](#macos) + + + If you're installing the npm module you'll need certain dependencies to build the native modules used by VS Code.