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

Add retry to SetCloudBuildVariable method in VisualStudioTeamServices #675

Merged

Conversation

luboshl
Copy link

@luboshl luboshl commented Oct 20, 2021

Adds retry to the SetCloudBuildVariable method in the VisualStudioTeamServices.

The reason for this is to fix errors when building using dotnet CLI in Azure DevOps.

The "Nerdbank.GitVersioning.Tasks.SetCloudBuildVariables" task failed unexpectedly. [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
System.IO.IOException: No process is on the other end of the pipe. [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at System.ConsolePal.WindowsConsoleStream.Write(Byte[] buffer, Int32 offset, Int32 count) [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at System.IO.StreamWriter.WriteLine(String value) [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at System.IO.TextWriter.SyncTextWriter.WriteLine(String value) [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at Nerdbank.GitVersioning.CloudBuildServices.VisualStudioTeamServices.SetCloudBuildVariable(String name, String value, TextWriter stdout, TextWriter stderr) [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at Nerdbank.GitVersioning.Tasks.SetCloudBuildVariables.Execute() [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\agent04\_work\1\s\src\Demo.Common.Abstractions\Demo.Common.Abstractions.csproj]
##[error]The "Nerdbank.GitVersioning.Tasks.SetCloudBuildVariables" task failed unexpectedly.

@luboshl luboshl changed the base branch from master to v3.4 October 20, 2021 18:35
@AArnott AArnott added this to the v3.4 milestone Oct 23, 2021
@AArnott AArnott merged commit c60a072 into dotnet:v3.4 Oct 23, 2021
AArnott added a commit to AArnott/Library.Template that referenced this pull request Nov 2, 2021
We already call `nbgv cloud` in the cloud builds, so there is no need to set certain pipeline variables with every project.
In fact given a couple bugs that have come into NB.GV lately around issues on [AzP](dotnet/Nerdbank.GitVersioning#675) or [GitHub Actions](dotnet/Nerdbank.GitVersioning#683) around setting pipeline variables, this should improve build reliability.
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.

None yet

2 participants