Merge pull request #39 from sartography/chore/github_branches_to_docker_tags
Chore/GitHub branches to docker tags
This commit is contained in:
commit
9cb1a23a28
|
@ -22,10 +22,7 @@ install:
|
|||
- pipenv install
|
||||
|
||||
env:
|
||||
global:
|
||||
- COMMIT=${$TRAVIS_COMMIT::8}
|
||||
matrix:
|
||||
- PB_BASE_URL='http://workflow.sartography.com:5001/pb/'
|
||||
- PB_BASE_URL='http://workflow.sartography.com:5001/pb/'
|
||||
|
||||
script:
|
||||
- pipenv run coverage run -m pytest
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin || exit 1
|
||||
REPO="sartography/cr-connect-workflow"
|
||||
TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH" ; fi)
|
||||
COMMIT=${TRAVIS_COMMIT::8}
|
||||
|
||||
docker build -f Dockerfile -t "$REPO:$COMMIT" . || exit 1
|
||||
docker tag "$REPO:$COMMIT" "$REPO:$TAG" || exit 1
|
||||
docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER" || exit 1
|
||||
|
@ -16,4 +18,5 @@ sleep 30
|
|||
# Notify DC/OS that Docker image has been updated
|
||||
echo "Refreshing DC/OS..."
|
||||
STAGE=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "production"; else echo "$TRAVIS_BRANCH" ; fi)
|
||||
echo "STAGE = $STAGE"
|
||||
aws sqs send-message --region "$AWS_DEFAULT_REGION" --queue-url "$AWS_SQS_URL" --message-body "crconnect/$STAGE/backend" || exit 1
|
||||
|
|
Loading…
Reference in New Issue