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

For release branches there's a conflict while publishing NuGet package #616

Closed
pascalberger opened this issue Aug 9, 2020 · 5 comments
Closed

Comments

@pascalberger
Copy link
Member

Using Cake.Recipe 2.0.0-alpha0319 I get the following error after running builds for subsequent commits on a release branch:

Pushing C:/projects/cake-issues-reporting-generic/BuildArtifacts/Packages/NuGet/Cake.Issues.Reporting.Generic.0.9.0-beta0002.nupkg to PreRelease Source with Url https://pkgs.dev.azure.com/cake-contrib/Home/_packaging/addins/nuget/v3/index.json...
Pushing Cake.Issues.Reporting.Generic.0.9.0-beta0002.nupkg to 'https://pkgs.dev.azure.com/cake-contrib/b0c78987-6a6a-43a7-840a-20702ebe73ac/_packaging/28a780f3-52df-48a7-8220-17568c45552d/nuget/v2/'...
  PUT https://pkgs.dev.azure.com/cake-contrib/b0c78987-6a6a-43a7-840a-20702ebe73ac/_packaging/28a780f3-52df-48a7-8220-17568c45552d/nuget/v2/
  Conflict https://pkgs.dev.azure.com/cake-contrib/b0c78987-6a6a-43a7-840a-20702ebe73ac/_packaging/28a780f3-52df-48a7-8220-17568c45552d/nuget/v2/ 2095ms
To skip already published packages, use the option -SkipDuplicate
Cake.exe : Response status code does not indicate success: 409 (Conflict - The feed already contains 'Cake.Issues.Reporting.Generic 0.9.0-beta0002'. (DevOps Activity ID: 44612550-C113-4AE8-97DF-89388087E4AE)).

See Log

@gep13
Copy link
Member

gep13 commented Aug 30, 2020

@pascalberger just seeing this one now. This really comes down to the configuration of GitVersion I think. How would you see this being resolved?

@pascalberger
Copy link
Member Author

Having the first build with a version number published and subsequent ones skipped doesn't seem like a good option to me. If we're going to publish CI package for every version, version numbers should be unique for every build IMHO.

@AdmiringWorm
Copy link
Member

I would suggest making use of the SkipDuplicate property on the NuGetPushSettings class.
However, I am not sure what approach would be most appropriate in this case.
Could just blindly set it no matter what, make it a global configuration variable or making it configurable per package provider.

@pascalberger
Copy link
Member Author

But is it really helpful if you have a CI package available for the first build with a specific version, but not from any subsequent builds? IMHO this is just confusing

gep13 added a commit that referenced this issue Sep 28, 2020
When running multiple commits on a release/hotfix branch, GitVersion
doesn't assert a unique version number unless a tag is applied.

To counteract this, concatenate to asserted version number, to make a
new unique one, when running on a release/hotfix branch.
@gep13
Copy link
Member

gep13 commented Sep 28, 2020

@pascalberger I believe this has been addressed, and we also discussed the other issue we spoke about on tonights stream, but I think that will need additional testing.

@gep13 gep13 closed this as completed Sep 28, 2020
gep13 added a commit that referenced this issue Oct 5, 2020
* release/2.0.0: (340 commits)
  (GH-697) Update JetBrains.ReSharper.CommandLineTools reference from 2020.2.3 to 2020.2.4
  Add rule URL resolver for CakeContrib-Guidelines
  Update Cake.Issues.Recipe to 0.4.3
  (GH-691) Update JetBrains.ReSharper.CommandLineTools reference from 2020.2.2 to 2020.2.3
  Revert "(GH-673) Use .Net Global Tool for ReSharper Tools"
  (GH-616) Create unique version number
  Update Cake.Issues.Recipe to 0.4.2
  (GH-687) using RepositoryName insteadof repositoryName to make use of the default-value for RepositoryName.
  (GH-612) Add docs for upgrading to 2.0.0
  (GH-673) Use .Net Global Tool for ReSharper Tools
  Update Cake.Issues.Recipe to 0.4.1
  (GH-684) parameter ShouldDocumentSourceFiles is no longer dependent on ShouldGenerateDocumentation.
  (GH-677) Updated documentation to reflect the changes of the default of webLinkRoot
  (GH-680) Documentation of GH-680 as a known-issue.
  (GH-677) set default for WebLinkRoot as RepositoryName instead of title.
  (GH-675) Update Cake.Transifex reference from 0.9.0 to 0.9.1
  (maint) Switch to latest version of Kudu
  (GH-674) Update github action workflow with cake-action
  (GH-674) update bootstrappers to run use .NET Core global tool
  (maint) Correct line endings for shell scripts
  ...
cake-contrib-bot pushed a commit that referenced this issue Oct 5, 2020
Merge branch 'release/2.0.0' into master

* release/2.0.0: (340 commits)
  (GH-697) Update JetBrains.ReSharper.CommandLineTools reference from 2020.2.3 to 2020.2.4
  Add rule URL resolver for CakeContrib-Guidelines
  Update Cake.Issues.Recipe to 0.4.3
  (GH-691) Update JetBrains.ReSharper.CommandLineTools reference from 2020.2.2 to 2020.2.3
  Revert "(GH-673) Use .Net Global Tool for ReSharper Tools"
  (GH-616) Create unique version number
  Update Cake.Issues.Recipe to 0.4.2
  (GH-687) using RepositoryName insteadof repositoryName to make use of the default-value for RepositoryName.
  (GH-612) Add docs for upgrading to 2.0.0
  (GH-673) Use .Net Global Tool for ReSharper Tools
  Update Cake.Issues.Recipe to 0.4.1
  (GH-684) parameter ShouldDocumentSourceFiles is no longer dependent on ShouldGenerateDocumentation.
  (GH-677) Updated documentation to reflect the changes of the default of webLinkRoot
  (GH-680) Documentation of GH-680 as a known-issue.
  (GH-677) set default for WebLinkRoot as RepositoryName instead of title.
  (GH-675) Update Cake.Transifex reference from 0.9.0 to 0.9.1
  (maint) Switch to latest version of Kudu
  (GH-674) Update github action workflow with cake-action
  (GH-674) update bootstrappers to run use .NET Core global tool
  (maint) Correct line endings for shell scripts
  ...
codemonkey256 added a commit to codemonkey256/Cake.Recipe that referenced this issue Oct 26, 2020
…orrect semantic version number

Hotfix and Release branches should use the unique semantic version
number - implemented in (cake-contribGH-616).

To fully implement as intended, the logic for applying the correct
semantic version format needs to ensure that the 'is tagged' check
is applied to each of the branch types.
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

No branches or pull requests

3 participants