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

Use project version as default tag #513

Merged
merged 4 commits into from
Jan 4, 2022
Merged

Use project version as default tag #513

merged 4 commits into from
Jan 4, 2022

Conversation

fawind
Copy link
Contributor

@fawind fawind commented Dec 13, 2021

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 and dockerPush 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:

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==

@changelog-app
Copy link

changelog-app bot commented Dec 13, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Use project version as default tag

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from robert3005 December 13, 2021 13:45
@fawind fawind requested review from CRogers and removed request for robert3005 December 13, 2021 13:45
}

@Deprecated
public void tags(String... args) {
this.tags = ImmutableSet.copyOf(args)
this.tags.set(ImmutableSet.copyOf(args))
Copy link
Contributor

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]?

Copy link
Contributor Author

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.

Choose a reason for hiding this comment

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

@CRogers, this was a bad change. Now there's no way NOT to build the version tag (#516)

@bulldozer-bot bulldozer-bot bot merged commit 3ce2d29 into develop Jan 4, 2022
@bulldozer-bot bulldozer-bot bot deleted the fw/default-tag branch January 4, 2022 14:00
@svc-autorelease
Copy link
Collaborator

Released 0.32.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants