From d27617c7a52ac6cca308e04947117f5a5c860d6e Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Sat, 21 Sep 2019 03:37:03 +0800 Subject: [PATCH 01/10] [doc/quickstart] use version from GH-379 This is the same PR but with some fixes for v2. Co-Authored-by: nwtnsqrd Signed-off-by: Ayane Satomi --- doc/quickstart.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/doc/quickstart.md b/doc/quickstart.md index b7e3afb23f7a..db76d15fcafb 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -59,27 +59,23 @@ In some cases you might need to run code-server automatically once the host star ```ini [Unit] - -Description=VSCode in a browser - +Description=Code Server IDE After=network.target [Service] - Type=simple - -ExecStart=/usr/bin/code-server $(pwd) - -WorkingDirectory=$HOME/projects - -ExecStop=/sbin/start-stop-daemon --stop -x /usr/bin/code-server - +User= +EnvironmentFile=$HOME/.profile +WorkingDirectory=$HOME Restart=on-failure +RestartSec=10 -User=1000 +ExecStart= $(pwd) -[Install] +StandardOutput=file:/var/log/code-server-output.log +StandardError=file:/var/log/code-server-error.log +[Install] WantedBy=multi-user.target ``` From 3a675f67d0764c4b91ed510f3727154f8c8a8525 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Mon, 14 Oct 2019 22:29:46 +0800 Subject: [PATCH 02/10] ci: add ARM support for Travis building this will replace my previous ARM PRs Signed-off-by: Ayane Satomi --- .travis.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b9b003fa063..c564842b0f9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,30 @@ before_install: # Don't build on tags because we'll already have built the commit. jobs: include: - - name: "Linux build" + - name: "Linux build - x86" os: linux + arch: amd64 dist: trusty env: TARGET="linux" if: tag IS blank script: scripts/ci.bash - - name: "Alpine build" + - name: "Alpine build - x86" os: linux + arch: amd64 + dist: trusty + env: TARGET="alpine" + if: tag IS blank + script: scripts/ci.bash + - name: "Linux build - ARM" + os: linux + arch: arm64 + dist: trusty + env: TARGET="linux" + if: tag IS blank + script: scripts/ci.bash + - name: "Alpine build - ARM" + os: linux + arch: arm64 dist: trusty env: TARGET="alpine" if: tag IS blank @@ -31,9 +47,17 @@ jobs: os: osx if: tag IS blank script: travis_wait 30 scripts/ci.bash - - name: "Docker build" + - name: "Docker build - x86" + os: linux + dist: trusty + arch: amd64 + env: DOCKER_BUILD="true" + if: branch == master AND tag IS blank + script: docker build --build-arg githubToken="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$TAG" -t codercom/code-server:v2 . + - name: "Docker build - ARM" os: linux dist: trusty + arch: arm64 env: DOCKER_BUILD="true" if: branch == master AND tag IS blank script: docker build --build-arg githubToken="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$TAG" -t codercom/code-server:v2 . From 48f608aa0c4c1ccd537f27ae87076490974c0159 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 20:20:35 +0700 Subject: [PATCH 03/10] scripts/ci: force local on ci.bash Signed-off-by: Ayane Satomi --- scripts/ci.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci.bash b/scripts/ci.bash index 96aff3aee5b7..a72a73a5e148 100755 --- a/scripts/ci.bash +++ b/scripts/ci.bash @@ -69,7 +69,7 @@ function main() { >&2 echo "Must set VSCODE_VERSION environment variable"; exit 1 fi - if [[ "${ostype}" == "darwin"* ]]; then + if [[ "${ostype}" == "darwin"* ]] && [[ "${ostype}" == "linux" ]]; then local-build else docker-build From 0008634161c9e0d227ce4166c722d8a8a8f18bff Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 20:25:51 +0700 Subject: [PATCH 04/10] [ci] use precise for Docker builds Signed-off-by: Ayane Satomi --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a23d282ec2e..358f2f76ec71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ jobs: - name: "Linux build - x86_64" os: linux arch: amd64 - dist: trusty + dist: precise env: TARGET="linux" PUSH_DOCKER="true" if: tag IS blank script: scripts/ci.bash @@ -32,7 +32,7 @@ jobs: - name: "Linux build - ARM" os: linux arch: arm64 - dist: trusty + dist: precise env: TARGET="linux" if: tag IS blank script: scripts/ci.bash From 2f8d392340cb5e92dd3bfc97097b4fdf30afcb58 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 20:38:55 +0700 Subject: [PATCH 05/10] scripts/ci: skip docker builds on non-Alpine targets Signed-off-by: Ayane Satomi --- scripts/ci.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci.bash b/scripts/ci.bash index a72a73a5e148..58e6698004c2 100755 --- a/scripts/ci.bash +++ b/scripts/ci.bash @@ -60,6 +60,7 @@ function main() { local vscodeVersion="${VSCODE_VERSION:-}" local ostype="${OSTYPE:-}" local package="${PACKAGE:-}" + local target="${TARGET:-}" if [[ -z "${codeServerVersion}" ]] ; then >&2 echo "Must set VERSION environment variable"; exit 1 @@ -69,7 +70,7 @@ function main() { >&2 echo "Must set VSCODE_VERSION environment variable"; exit 1 fi - if [[ "${ostype}" == "darwin"* ]] && [[ "${ostype}" == "linux" ]]; then + if [[ "${ostype}" == "darwin"* ]] && [[ "${target}" == "linux" ]]; then local-build else docker-build From 0f9312f1e13eaf91d74c70a1a25fe81c8b5da0ea Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 20:45:35 +0700 Subject: [PATCH 06/10] scripts/ci: redo checking again Signed-off-by: Ayane Satomi --- .travis.yml | 2 +- scripts/ci.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 358f2f76ec71..cc7d794da4e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ jobs: - name: "Linux build - ARM" os: linux arch: arm64 - dist: precise + dist: xenial env: TARGET="linux" if: tag IS blank script: scripts/ci.bash diff --git a/scripts/ci.bash b/scripts/ci.bash index 58e6698004c2..0638da3dc37b 100755 --- a/scripts/ci.bash +++ b/scripts/ci.bash @@ -70,7 +70,7 @@ function main() { >&2 echo "Must set VSCODE_VERSION environment variable"; exit 1 fi - if [[ "${ostype}" == "darwin"* ]] && [[ "${target}" == "linux" ]]; then + if [[ "${ostype}" == "darwin"* ]] || [[ "${target}" == "linux" ]]; then local-build else docker-build From 50a105cb43d270b5c0c8273742fcfa430183d6a0 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 20:57:50 +0700 Subject: [PATCH 07/10] scripts/ci: fix conditional one more time Signed-off-by: Ayane Satomi --- scripts/ci.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci.bash b/scripts/ci.bash index 0638da3dc37b..af9596347a05 100755 --- a/scripts/ci.bash +++ b/scripts/ci.bash @@ -70,7 +70,7 @@ function main() { >&2 echo "Must set VSCODE_VERSION environment variable"; exit 1 fi - if [[ "${ostype}" == "darwin"* ]] || [[ "${target}" == "linux" ]]; then + if [[ "${ostype}" == "darwin"* -o "${target}" == "linux" ]];; then local-build else docker-build From ff2985fab869f2270695c2f9fbccbd354a9b36fa Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 20:59:50 +0700 Subject: [PATCH 08/10] scripts/ci: revise conditional once more Signed-off-by: Ayane Satomi --- scripts/ci.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci.bash b/scripts/ci.bash index af9596347a05..e82d69736832 100755 --- a/scripts/ci.bash +++ b/scripts/ci.bash @@ -70,7 +70,7 @@ function main() { >&2 echo "Must set VSCODE_VERSION environment variable"; exit 1 fi - if [[ "${ostype}" == "darwin"* -o "${target}" == "linux" ]];; then + if [[ "${ostype}" == "darwin"* || "${target}" == "linux" ]];; then local-build else docker-build From 1e13d85f939e8fff70dc8edfd75737781e454265 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 21:05:32 +0700 Subject: [PATCH 09/10] scripts/ci: fix syntax error Signed-off-by: Ayane Satomi --- scripts/ci.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci.bash b/scripts/ci.bash index e82d69736832..ec78237982c4 100755 --- a/scripts/ci.bash +++ b/scripts/ci.bash @@ -70,7 +70,7 @@ function main() { >&2 echo "Must set VSCODE_VERSION environment variable"; exit 1 fi - if [[ "${ostype}" == "darwin"* || "${target}" == "linux" ]];; then + if [[ "${ostype}" == "darwin"* || "${target}" == "linux" ]]; then local-build else docker-build From 9472d76d51557a40e60b5db218494c25a8592428 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 23 Oct 2019 22:24:20 +0700 Subject: [PATCH 10/10] ci: remove Docker builds Signed-off-by: Ayane Satomi --- .travis.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index cc7d794da4e6..4f0d45f00c40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,21 +47,6 @@ jobs: os: osx if: tag IS blank script: travis_wait 40 scripts/ci.bash - - name: "Docker build - x86_64" - os: linux - dist: trusty - arch: amd64 - env: DOCKER_BUILD="true" - if: branch == master AND tag IS blank - script: docker build --build-arg githubToken="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$TAG" -t codercom/code-server:v2 . - - name: "Docker build - ARM" - os: linux - dist: trusty - arch: arm64 - env: DOCKER_BUILD="true" - if: branch == master AND tag IS blank - script: docker build --build-arg githubToken="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$TAG" -t codercom/code-server:v2 . - git: depth: 3