Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Git tags to generate Docker tagged images #128

Merged
merged 2 commits into from
Feb 10, 2020
Merged

Conversation

dduportal
Copy link
Contributor

This PR closes #54 .

It allows triggering a Travis CI build by creating a git tag or a github release,
that results in a a tagged Docker image.

Please note the following elements:

  • The tag latest will be kept, containing the image built from the HEAD of the branch `master as it was before
  • Git tag can happen on any branch, not only master
  • The variable TRAVIS_BRANCH is used to pass the tag being built, as per https://docs.travis-ci.com/user/environment-variables#default-environment-variables . This documentation specifies that this variables contains the git tag which triggered the build (e.g. the same value as $TRAVIS_TAG), or the branch if it is "push-triggered" build (or the target branch if it is a PR).
  • Tags and branch names with a / are supported: there is a search and replace rule which turns / to - for the resulting Docker tag, as the slash is not a valid character for a Docker tag.

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]>
@dduportal
Copy link
Contributor Author

For demonstration purpose, a "dummy" tag named test-release had been created:

Please note that, even if the README.md is generated for a tagged release, the only updated of the README page in the Dockerhub comes from the file README.md on the master branch only.

@dduportal
Copy link
Contributor Author

👋 @mojavelinux if it is ok , I'll let you the honor to draft the first 1.0.0 after merging this PR.

I'll take care of cleaning up the "dummy" tag in bot the repo and DockerHub (and I'll start working on the renaming in #79)

@mojavelinux
Copy link
Member

Unless you really need me to do it, I think it would be more appropriate if you cut the release. I'm just here to make sure you have what you need so it goes smoothly ;)

@dduportal
Copy link
Contributor Author

Sounds good then: I need a review + LGTM then.

Thanks Dan!

Copy link
Member

@mojavelinux mojavelinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dduportal dduportal merged commit 11eddee into master Feb 10, 2020
@dduportal dduportal deleted the feature/releases branch February 10, 2020 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create releases/tags for Docker Images
2 participants