Skip to content

Commit

Permalink
Found a cleaner solution
Browse files Browse the repository at this point in the history
  • Loading branch information
eheinrich committed May 8, 2020
1 parent 47070ac commit f49e480
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .travis.yml
Expand Up @@ -30,19 +30,13 @@ script: coverage run manage.py test --settings=test_settings
after_success: coveralls
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export DOCKER_REPOSITORY=observatorycontrolsystem/observation-portal
- export COMMIT=${TRAVIS_COMMIT::6}
- docker build -t $DOCKER_REPOSITORY .
- env
- export SHORT_COMMIT=${TRAVIS_COMMIT::12}
- export IMAGE_TAG=${TRAVIS_TAG:-$SHORT_COMMIT}
- export IMAGE=observatorycontrolsystem/observation-portal:$IMAGE_TAG
- docker build -t $IMAGE .
deploy:
- provider: script
script: IMAGE=$DOCKER_REPOSITORY:$TRAVIS_TAG; docker tag $DOCKER_REPOSITORY $IMAGE && docker push $IMAGE
skip_cleanup: true
on:
repo: LCOGT/observation-portal
tags: true
- provider: script
script: bash -c 'IMAGE=$DOCKER_REPOSITORY:$COMMIT; echo $IMAGE && docker tag $DOCKER_REPOSITORY $IMAGE && docker push $IMAGE'
script: docker push $IMAGE
skip_cleanup: true
on:
repo: LCOGT/observation-portal
Expand Down

0 comments on commit f49e480

Please sign in to comment.