Skip to content

Commit

Permalink
Improve docker push to include version slices
Browse files Browse the repository at this point in the history
  • Loading branch information
felddy committed Jun 4, 2019
1 parent c7006f3 commit 7834e80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,19 @@ after_script:
- docker-compose down
before_deploy:
- version=$(./bump_version.sh show)
- IFS='.' read -r -a version_array <<< "$version"
- docker login -u "$DOCKER_USER" -p "$DOCKER_PW"
- docker tag "$IMAGE_NAME" "${IMAGE_NAME}:latest"
- docker tag "$IMAGE_NAME" "${IMAGE_NAME}:${version}"
- docker tag "$IMAGE_NAME"
"${IMAGE_NAME}:${version_array[0]}.${version_array[1]}"
- docker tag "$IMAGE_NAME" "${IMAGE_NAME}:${version_array[0]}"
deploy:
- provider: script
script: docker push "${IMAGE_NAME}:latest" &&
docker push "${IMAGE_NAME}:${version}"
docker push "${IMAGE_NAME}:${version}" &&
docker push "${IMAGE_NAME}:${version_array[0]}.${version_array[1]}" &&
docker push "${IMAGE_NAME}:${version_array[0]}"
on:
tags: true
python: '3.7'
9 changes: 0 additions & 9 deletions travis_scripts/build_docker_image.sh

This file was deleted.

9 changes: 0 additions & 9 deletions travis_scripts/deploy_to_docker_hub.sh

This file was deleted.

0 comments on commit 7834e80

Please sign in to comment.