mirror of
https://github.com/coder/code-server.git
synced 2026-05-30 10:24:08 +02:00
Push Docker using Linux build
Instead of doing a separate redundant build. The main problem was that the files weren't being cached. There is probably a better way of solving this but this seems to be the simplest for now.
This commit is contained in:
14
.travis.yml
14
.travis.yml
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: "Linux build"
|
||||
os: linux
|
||||
dist: trusty
|
||||
env: TARGET="linux"
|
||||
env: TARGET="linux" PUSH_DOCKER="true"
|
||||
if: tag IS blank
|
||||
script: scripts/ci.bash
|
||||
- name: "Alpine build"
|
||||
@@ -31,12 +31,6 @@ jobs:
|
||||
os: osx
|
||||
if: tag IS blank
|
||||
script: travis_wait 40 scripts/ci.bash
|
||||
- name: "Docker build"
|
||||
os: linux
|
||||
dist: trusty
|
||||
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
|
||||
@@ -46,7 +40,7 @@ before_deploy:
|
||||
- git config --local user.name "$USER_NAME"
|
||||
- git config --local user.email "$USER_EMAIL"
|
||||
- if ! git tag "$TAG" "$TRAVIS_COMMIT" ; then echo "$TAG already exists"; fi
|
||||
- if [[ -n "$DOCKER_BUILD" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ; fi
|
||||
- if [[ -n "$PUSH_DOCKER" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ; fi
|
||||
|
||||
deploy:
|
||||
- provider: releases
|
||||
@@ -67,11 +61,11 @@ deploy:
|
||||
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: docker push codercom/code-server:"$TAG" ; docker push codercom/code-server:v2
|
||||
script: docker build -f ./scripts/ci.dockerfile --build-arg -t codercom/code-server:"$TAG" -t codercom/code-server:v2 . && docker push codercom/code-server:"$TAG" && docker push codercom/code-server:v2
|
||||
on:
|
||||
repo: cdr/code-server
|
||||
branch: master
|
||||
condition: -n "$DOCKER_BUILD"
|
||||
condition: -n "$PUSH_DOCKER"
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
|
||||
Reference in New Issue
Block a user