Skip to content

Fix tag-number-pattern and useBranchName configuration options for ContinuousDeployment mode #906

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

Merged
merged 9 commits into from
Jul 7, 2016

Conversation

simonejsing
Copy link

Potential fix for issue #902


[Test]
[Category("NoMono")]
[Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
Copy link
Member

Choose a reason for hiding this comment

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

I can't see that ShouldMatchApproved() is used in the test, so the Category and Description attributes can safely be removed, no?

Copy link
Author

Choose a reason for hiding this comment

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

The first failure I got seemed to be related to the tests running on mono, but you are right it looks like 228082b did pass the build.

@asbjornu
Copy link
Member

@simonejsing Since the build ran on Mono just fine, I think you can just reset back to 228082b. Otherwise, this looks good to me. I don't quite understand the need for this, but I see that you and @JakeGinnivan have discussed this in #902, so if he agrees this is a nice-to-have feature, I'll happily merge. 😃

@asbjornu asbjornu changed the title Simon/uniqueprnuget Add tag-name-pattern configuration option Jun 15, 2016
@asbjornu asbjornu changed the title Add tag-name-pattern configuration option Add tag-name-pattern configuration option Jun 15, 2016
@simonejsing
Copy link
Author

Looks like you were right, the test is enabled again now. Thanks.

@JakeGinnivan
Copy link
Contributor

Could we instead change the behavior of tag-number-pattern to not replace build metadata but inject itself between the tag name and number.

I don't think we need to support both scenarios.

@simonejsing
Copy link
Author

@JakeGinnivan you mean for the case where the branch is configured in ContinuousDeployment mode? To clarify, that would essentially mean use the same implementation but just use tag-number-pattern instead of introducing a new option. That would work. The reason I opted for the new construct was to avoid breaking existing behavior, but if that is not a concern then I agree with you.

@JakeGinnivan
Copy link
Contributor

ContinuousDelivery doesn't really work will pull requests because you can't tag a pull request (it's from another repo) and TBH they can be rebased and such. Meaning we only really have to think about ContinuousDeployment.

I would say that the current behaviour is a bug because by it's definition continuous deployment should increment each commit.

@simonejsing
Copy link
Author

Should we change the default configuration for pull request branches to be ContinuousDeployment as well then? Today it is set to ContinuousDelivery

@simonejsing
Copy link
Author

I've also noticed that the tag 'useBranchName' does not work when a branch is set to ContinuousDeployment, I'm fixing that as well.

@simonejsing simonejsing changed the title Add tag-name-pattern configuration option Fix tag-number-pattern and useBranchName configuration options for ContinuousDeployment mode Jun 17, 2016
@simonejsing
Copy link
Author

New review out, let me know if there are more comments.

@simonejsing
Copy link
Author

Guys can you please review and pull this in?

@JakeGinnivan
Copy link
Contributor

Heya

This may have problems with sorting on NuGet. For example PR number 2 will end up higher than pr 11. How will the packages be consumed?

@simonejsing
Copy link
Author

I see what you mean. Normally it's not a problem since you rarely will consume the latest pre-release packages. I'll add leading zeros like we do for the number.

@simonejsing
Copy link
Author

Please review

@asbjornu
Copy link
Member

asbjornu commented Jul 7, 2016

@simonejsing Looks good, but your branch is a bit of a mess after all the merges. You should instead use rebase, so you don't get all those merge commits. The pull request will look a lot cleaner then. Think you can clean it up a bit? If you need help on how to get it to a cleaner state, please let me know and I'll be happy to let you know exactly what to write on the command line. 😃

@simonejsing simonejsing force-pushed the simon/uniqueprnuget branch from dfad961 to 245e4a1 Compare July 7, 2016 17:24
@simonejsing
Copy link
Author

Okay, looks like I failed pretty bad at rebasing this...

@simonejsing simonejsing force-pushed the simon/uniqueprnuget branch from 245e4a1 to 959e84a Compare July 7, 2016 17:34
@simonejsing
Copy link
Author

That looks better.

@simonejsing
Copy link
Author

@asbjornu I've rebased onto the latest master and force pushed in order to reuse the PR. Let me know if you would like a new PR instead.

@asbjornu
Copy link
Member

asbjornu commented Jul 7, 2016

@simonejsing Looks much better, thanks! 👍

@asbjornu asbjornu merged commit 3edc110 into GitTools:master Jul 7, 2016
@simonejsing simonejsing deleted the simon/uniqueprnuget branch July 7, 2016 19:23
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.

3 participants