Archived
1
0

Move DOCKER_BUILD check into deploy script

This commit is contained in:
Asher 2019-09-17 14:45:03 -05:00
parent 1252eb6a8a
commit d36526b1c8
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -46,7 +46,7 @@ before_deploy:
- git config --local user.name "$USER_NAME" - git config --local user.name "$USER_NAME"
- git config --local user.email "$USER_EMAIL" - git config --local user.email "$USER_EMAIL"
- if ! git tag "$TAG" "$TRAVIS_COMMIT" ; then echo "$TAG already exists"; fi - if ! git tag "$TAG" "$TRAVIS_COMMIT" ; then echo "$TAG already exists"; fi
- if [[ "$DOCKER_BUILD" == "true" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin hub.docker.com; fi - if [[ -n "$DOCKER_BUILD" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin hub.docker.com ; fi
deploy: deploy:
- provider: releases - provider: releases
@ -67,11 +67,10 @@ deploy:
- provider: script - provider: script
skip_cleanup: true skip_cleanup: true
script: docker push codercom/code-server:"$VERSION" ; docker push codercom/code-server:v2 script: if [[ -n "$DOCKER_BUILD" ]] ; then docker push codercom/code-server:"$VERSION" && docker push codercom/code-server:v2 ; fi
on: on:
repo: cdr/code-server repo: cdr/code-server
branch: master branch: master
condition: "$DOCKER_BUILD" == "true"
cache: cache:
yarn: true yarn: true