-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Git tags to generate Docker tagged images (#128)
* Fixing Makefile to allow tag builds Signed-off-by: dduportal <[email protected]> wip travis Signed-off-by: dduportal <[email protected]> Fix docker image tag variable Signed-off-by: dduportal <[email protected]> Support of branches or tags with a slash Signed-off-by: dduportal <[email protected]> wip Signed-off-by: dduportal <[email protected]> * Allow travis deploy on all branches Signed-off-by: dduportal <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
17 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 |
---|---|---|
|
@@ -5,23 +5,24 @@ services: | |
|
||
env: | ||
global: | ||
- CURRENT_GIT_BRANCH=$TRAVIS_BRANCH | ||
- CURRENT_GIT_REF="${TRAVIS_BRANCH}" # Pass the tag, or target branch for a PR, or the branch | ||
|
||
script: | ||
- make build | ||
- make test | ||
- make build | ||
- make test | ||
|
||
before_deploy: | ||
# Set up git user name before generating README.md as part of deploy | ||
- git config --local user.name "travis-build" | ||
- git config --local user.email "[email protected]" | ||
|
||
deploy: | ||
- provider: script | ||
script: make README.md deploy | ||
# Do not deploy if Pull Request | ||
# If a contributor want to deploy on its own DockerHub account: | ||
# 1 - Enable Travis on the forked repository | ||
# 2 - Set the environment variable DOCKERHUB_USERNAME in Travis Settings | ||
on: | ||
condition: $TRAVIS_PULL_REQUEST = false | ||
- provider: script | ||
script: make README.md deploy | ||
# Do not deploy if Pull Request | ||
# If a contributor want to deploy on its own DockerHub account: | ||
# 1 - Enable Travis on the forked repository | ||
# 2 - Set the environment variable DOCKERHUB_USERNAME in Travis Settings | ||
on: | ||
all_branches: true | ||
condition: $TRAVIS_PULL_REQUEST = false |
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