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

Unable to publish when running on Azure Pipelines #768

Closed
gep13 opened this issue Feb 16, 2021 · 4 comments
Closed

Unable to publish when running on Azure Pipelines #768

gep13 opened this issue Feb 16, 2021 · 4 comments
Assignees
Labels
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Feb 16, 2021

When running a tag build on Azure Pipelines, the IsTagged property is false, when it should be true.

Looking that the code, it is using the SourceBranchName, rather than SourceBranch. As per the docs here:

https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services

The latter will only include something like 0.3.0, where as the logic for IsTagged needs the full branch name, which would be refs/tags/0.3.0

@gep13 gep13 added the Bug label Feb 16, 2021
@gep13 gep13 added this to the 3.0.0 milestone Feb 16, 2021
@gep13 gep13 self-assigned this Feb 16, 2021
gep13 added a commit that referenced this issue Feb 16, 2021
Also include this variable in the output of the variables written to the
log.
gep13 added a commit that referenced this issue Feb 16, 2021
Otherwise, calculation of BranchType within Cake.Recipe won't work as
expected.
@gep13 gep13 closed this as completed Feb 16, 2021
@gep13
Copy link
Member Author

gep13 commented Feb 16, 2021

Looks like there is still an underlying issue here.

When running on a tagged build, it is necessary to do some additional work, otherwise the BranchType is unknown, which causes sending out tweets/gitter messages etc to not work.

@gep13 gep13 reopened this Feb 16, 2021
gep13 added a commit that referenced this issue Feb 16, 2021
This is similar to what we have had to do in the GitHub Actions
provider, since the branch name is not part of the information that is
provided directly. When the branch name contains refs/tags, execute git
to find the branch name, otherwise, accept the branch name that is
provided.
gep13 added a commit that referenced this issue Feb 16, 2021
So that we can execute StartProcess
@AdmiringWorm
Copy link
Member

@gep13 just a thought. Should maybe the twitter and gitter code just consider if the build is tagged, and pretty much ignore everything else?

@gep13
Copy link
Member Author

gep13 commented Feb 16, 2021

@AdmiringWorm I did consider that, but I think that might be a change for another day.

Having the actual branch name available is still a good thing to have, and once we have it working reliably, I think we can look to refactor is it no longer becomes a requirement for certain actions.

gep13 added a commit that referenced this issue Feb 16, 2021
i.e. hotfixes. Here, the source branch name only contains the last part,
after the last /, which is not initially what we want.
gep13 added a commit that referenced this issue Feb 16, 2021
@gep13 gep13 closed this as completed Feb 16, 2021
gep13 added a commit that referenced this issue Feb 17, 2021
* release/2.2.0: (51 commits)
  (build) Update github action dependencies when drafting release notes
  (maint) Added custom step to generate includes.cake script
  (maint) Add workflow for creating release notes
  (GH-755) Update JetBrains.ReSharper.CommandLineTools reference from 2020.3.0 to 2020.3.2
  (GH-754) Update NuGet.CommandLine reference from 5.8.0 to 5.8.1
  (GH-756) Update ReportGenerator reference from 4.8.0 to 4.8.5
  (GH-757) Update dotnet-reportgenerator-globaltool reference from 4.8.0 to 4.8.5
  (build) Add missing semi-colon
  (maint) Check for .Net Framework GitVersion
  (GH-77) Removed logging
  (GH-768) Attempt to handle multiple lines from git
  (GH-768) Add more logging
  (GH-768) Handle additional branch names
  (GH-768) Added missing context
  (GH-768) Lookup branch name from git
  (GH-769) Update Codecov.Tool reference from 1.12.4 to 1.13.0
  (GH-770) Update codecov reference from 1.12.4 to 1.13.0
  (GH-768) Use BranchSourceName for Branch Name
  (build) Switch to released version of GitVersion
  (GH-768) Switch to using SourceBranch
  ...
cake-contrib-bot pushed a commit that referenced this issue Feb 17, 2021
Merge branch 'release/2.2.0'

* release/2.2.0: (51 commits)
  (build) Update github action dependencies when drafting release notes
  (maint) Added custom step to generate includes.cake script
  (maint) Add workflow for creating release notes
  (GH-755) Update JetBrains.ReSharper.CommandLineTools reference from 2020.3.0 to 2020.3.2
  (GH-754) Update NuGet.CommandLine reference from 5.8.0 to 5.8.1
  (GH-756) Update ReportGenerator reference from 4.8.0 to 4.8.5
  (GH-757) Update dotnet-reportgenerator-globaltool reference from 4.8.0 to 4.8.5
  (build) Add missing semi-colon
  (maint) Check for .Net Framework GitVersion
  (GH-77) Removed logging
  (GH-768) Attempt to handle multiple lines from git
  (GH-768) Add more logging
  (GH-768) Handle additional branch names
  (GH-768) Added missing context
  (GH-768) Lookup branch name from git
  (GH-769) Update Codecov.Tool reference from 1.12.4 to 1.13.0
  (GH-770) Update codecov reference from 1.12.4 to 1.13.0
  (GH-768) Use BranchSourceName for Branch Name
  (build) Switch to released version of GitVersion
  (GH-768) Switch to using SourceBranch
  ...
@cake-contrib-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.2.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

cake-contrib-bot pushed a commit that referenced this issue Feb 17, 2021
Merge branch 'release/2.2.0'

* release/2.2.0: (51 commits)
  (build) Update github action dependencies when drafting release notes
  (maint) Added custom step to generate includes.cake script
  (maint) Add workflow for creating release notes
  (GH-755) Update JetBrains.ReSharper.CommandLineTools reference from 2020.3.0 to 2020.3.2
  (GH-754) Update NuGet.CommandLine reference from 5.8.0 to 5.8.1
  (GH-756) Update ReportGenerator reference from 4.8.0 to 4.8.5
  (GH-757) Update dotnet-reportgenerator-globaltool reference from 4.8.0 to 4.8.5
  (build) Add missing semi-colon
  (maint) Check for .Net Framework GitVersion
  (GH-77) Removed logging
  (GH-768) Attempt to handle multiple lines from git
  (GH-768) Add more logging
  (GH-768) Handle additional branch names
  (GH-768) Added missing context
  (GH-768) Lookup branch name from git
  (GH-769) Update Codecov.Tool reference from 1.12.4 to 1.13.0
  (GH-770) Update codecov reference from 1.12.4 to 1.13.0
  (GH-768) Use BranchSourceName for Branch Name
  (build) Switch to released version of GitVersion
  (GH-768) Switch to using SourceBranch
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants