Skip to content

Commit

Permalink
CD Improvement
Browse files Browse the repository at this point in the history
To push the latest tag as a docker image tagged like:
- Exact tag, f.e. `:3.0.3`
- Latest tag, `:latest`
- Latest minor release, f.e. `:3.0` 
- Latest major release, f.e. `:3`
  • Loading branch information
HadesArchitect authored Mar 30, 2020
1 parent 7b13ccc commit d133bcd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ after_success:
- docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-generator:${TRAVIS_TAG}
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker push killrvideo/killrvideo-generator:${TRAVIS_TAG}
- "[ \"$(git tag --sort=-v:refname | grep -P \"^\\d+.\\d+.\\d+$\" | head -n1)\" == \"$TRAVIS_TAG\" ] && { docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-generator:latest; docker push killrvideo/killrvideo-generator:latest; }"
- "[ \"$(git tag --sort=-v:refname | grep -P \"^\\d+.\\d+.\\d+$\" | head -n1)\" == \"$TRAVIS_TAG\" ] && { docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-generator:$(echo $TRAVIS_TAG | cut -d'.' -f 1); docker push killrvideo/killrvideo-generator:$(echo $TRAVIS_TAG | cut -d'.' -f 1); }"
- "[ \"$(git tag --sort=-v:refname | grep -P \"^\\d+.\\d+.\\d+$\" | head -n1)\" == \"$TRAVIS_TAG\" ] && { docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-generator:$(echo $TRAVIS_TAG | cut -d'.' -f 1).$(echo $TRAVIS_TAG | cut -d'.' -f 2); docker push killrvideo/killrvideo-generator:$(echo $TRAVIS_TAG | cut -d'.' -f 1).$(echo $TRAVIS_TAG | cut -d'.' -f 2); }"

# Sudo required for doing docker build
sudo: required
Expand Down

0 comments on commit d133bcd

Please sign in to comment.