Auto docker building and deploy in travis CI (#521)
* made spacing for travis yaml consistent in file * cleaned up .travis.yml and moved some code into a script * checking if i can get travis to build this * travis * fixed an if statement * fixed travis.yml file * replaced my name with codercom
This commit is contained in:
parent
a2ee6c8e73
commit
b8c3d96fcd
22
.travis.yml
22
.travis.yml
@ -19,20 +19,28 @@ jobs:
|
|||||||
dist: trusty
|
dist: trusty
|
||||||
env: TARGET="linux"
|
env: TARGET="linux"
|
||||||
if: tag IS blank
|
if: tag IS blank
|
||||||
|
script: scripts/ci.bash
|
||||||
- name: "Alpine build"
|
- name: "Alpine build"
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TARGET="alpine"
|
env: TARGET="alpine"
|
||||||
if: tag IS blank
|
if: tag IS blank
|
||||||
|
script: scripts/ci.bash
|
||||||
- name: "MacOS build"
|
- name: "MacOS build"
|
||||||
os: osx
|
os: osx
|
||||||
if: tag IS blank
|
if: tag IS blank
|
||||||
|
script: travis_wait 30 scripts/ci.bash
|
||||||
|
- name: "Docker build"
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
if: branch == master AND tag IS blank
|
||||||
|
script:
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin hub.docker.com
|
||||||
|
- docker build -t codercom/code-server:$VERSION .
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 3
|
depth: 3
|
||||||
|
|
||||||
script: travis_wait 30 scripts/ci.bash
|
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- echo "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
|
- echo "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
|
||||||
- git config --local user.name "$USER_NAME"
|
- git config --local user.name "$USER_NAME"
|
||||||
@ -40,9 +48,9 @@ before_deploy:
|
|||||||
- git tag "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
|
- git tag "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
- provider: releases
|
||||||
file_glob: true
|
file_glob: true
|
||||||
draft: true
|
prerelease: true
|
||||||
tag_name: "$VERSION-vsc$VSCODE_VERSION"
|
tag_name: "$VERSION-vsc$VSCODE_VERSION"
|
||||||
target_commitish: "$TRAVIS_COMMIT"
|
target_commitish: "$TRAVIS_COMMIT"
|
||||||
name: "$VERSION-vsc$VSCODE_VERSION"
|
name: "$VERSION-vsc$VSCODE_VERSION"
|
||||||
@ -55,6 +63,12 @@ deploy:
|
|||||||
on:
|
on:
|
||||||
repo: cdr/code-server
|
repo: cdr/code-server
|
||||||
branch: master
|
branch: master
|
||||||
|
- provider: script
|
||||||
|
script: docker push codercom/code-server:$VERSION
|
||||||
|
on:
|
||||||
|
repo: cdr/code-server
|
||||||
|
branch: master
|
||||||
|
condition: -n "$DOCKER_USERNAME"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
yarn: true
|
yarn: true
|
||||||
|
Reference in New Issue
Block a user