-
Notifications
You must be signed in to change notification settings - Fork 159
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
Use project version as default tag #513
Conversation
Generate changelog in
|
} | ||
|
||
@Deprecated | ||
public void tags(String... args) { | ||
this.tags = ImmutableSet.copyOf(args) | ||
this.tags.set(ImmutableSet.copyOf(args)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, from memory wasn't the way this used to work that people would put
docker {
tags 'latest'
}
but it would still make the version tag? I wonder if we just want to make getTags()
return tags.get() + [version]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to add the version tag to the other tags if it does not exist already.
However, I'm actually not 100% sure where the version tag came from before. E.g. a bunch of projects would not specify any tags and still get the correct publish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Released 0.32.0 |
Before this PR
With #506, we added a regression that not all docker images would be pushed if no tags were specified explicitly.
This is because the tasks
dockerTagsPush
anddockerPush
are just marker tasks that run the respective tag and push tasks for all tags. However, when no tags are specified, no sub-tasks will be created and run as the below closure is skipped:gradle-docker/src/main/groovy/com/palantir/gradle/docker/PalantirDockerPlugin.groovy
Line 148 in db4cfe1
After this PR
To work-around this, we add the project version as a default tag, if not other tags are specified. This will per-default tag and push an image with the current project version.
==COMMIT_MSG==
Use project version as default tag
==COMMIT_MSG==