-
-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #921 from kmehant/travis-fix-2
Now build shows only errors and other logs are redirected
- Loading branch information
Showing
7 changed files
with
89 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
dist: trusty | ||
language: minimal | ||
language: generic | ||
|
||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
notifications: | ||
webhooks: https://www.travisbuddy.com/ | ||
|
||
script: | ||
- docker build --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` -t scoreucsc/bassa-prod-ui ui | ||
- docker build -f ui/Dockerfile.dev --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` -t scoreucsc/bassa-dev-ui ui | ||
- docker build -f components/core/Dockerfile.prod --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` -t scoreucsc/bassa-prod-server components/core | ||
- docker build --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` -t scoreucsc/bassa-dev-server components/core | ||
- docker build --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` -t scoreucsc/bassa-aria2c components/aria2c | ||
|
||
|
||
after_success: | ||
- if [ "$TRAVIS_BRANCH" == "develop" -a "$TRAVIS_PULL_REQUEST" == "true" ]; then | ||
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; | ||
docker push scoreucsc/bassa-prod-ui; | ||
docker push scoreucsc/bassa-dev-ui; | ||
docker push scoreucsc/bassa-prod-server; | ||
docker push scoreucsc/bassa-dev-server | ||
docker push scoreucsc/bassa-aria2c; | ||
fi | ||
script: | ||
- docker build -t scoreucsc/bassa-ui:prod ui >/dev/null | ||
- docker build -f ui/Dockerfile.dev -t scoreucsc/bassa-ui:dev ui >/dev/null | ||
- docker build -f components/core/Dockerfile.prod -t scoreucsc/bassa-server:prod components/core >/dev/null | ||
- docker build -t scoreucsc/bassa-server:dev components/core >/dev/null | ||
- docker build -t scoreucsc/bassa-aria2c components/aria2c >/dev/null | ||
|
||
deploy: | ||
- provider: script | ||
script: deploy.sh | ||
on: | ||
branch: master | ||
- provider: script | ||
script: deploy.sh | ||
on: | ||
branch: develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#! /bin/bash | ||
|
||
# Build production and development use docker images | ||
# Build these images with two build args for better commit history | ||
# shows only logs pushed to stderr | ||
# release tag should be updated here for every release | ||
|
||
git_sha=$(git rev-parse --short HEAD) | ||
build_date=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) | ||
|
||
docker build --build-arg VCS_REF=$git_sha --build-arg BUILD_DATE=$build_date -t scoreucsc/bassa-ui:prod -t scoreucsc/bassa-ui:latest -t scoreucsc/bassa-ui:v1.0.0 ui >/dev/null | ||
docker build -f ui/Dockerfile.dev --build-arg VCS_REF=$git_sha --build-arg BUILD_DATE=$build_date -t scoreucsc/bassa-ui:dev ui >/dev/null | ||
docker build -f components/core/Dockerfile.prod --build-arg VCS_REF=$git_sha --build-arg BUILD_DATE=$build_date -t scoreucsc/bassa-server:prod -t scoreucsc/bassa-server:latest -t scoreucsc/bassa-server:v1.0.0 components/core >/dev/null | ||
docker build --build-arg VCS_REF=$git_sha --build-arg BUILD_DATE=$build_date -t scoreucsc/bassa-server:dev components/core >/dev/null | ||
docker build --build-arg VCS_REF=$git_sha --build-arg BUILD_DATE=$build_date -t scoreucsc/bassa-aria2c:latest -t scoreucsc/bassa-aria2c:v1.0.0 components/aria2c >/dev/null | ||
|
||
# push production docker images with tags prod, latest, release:v1.0.0 | ||
# push development docker images with tag dev | ||
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" | ||
|
||
# Production tag | ||
docker push scoreucsc/bassa-ui:prod | ||
docker push scoreucsc/bassa-server:prod | ||
|
||
# Latest tag | ||
docker push scoreucsc/bassa-ui:latest | ||
docker push scoreucsc/bassa-server:latest | ||
docker push scoreucsc/bassa-aria2c:latest | ||
|
||
# v1.0.0 tag | ||
docker push scoreucsc/bassa-ui:v1.0.0 | ||
docker push scoreucsc/bassa-server:v1.0.0 | ||
docker push scoreucsc/bassa-aria2c:v1.0.0 | ||
|
||
# Development tag | ||
docker push scoreucsc/bassa-ui:dev | ||
docker push scoreucsc/bassa-server:dev | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters