Open AlexNek opened 1 year ago
Please update to 2.0.1 and let me know if still a problem.
I have just installed 2.0.1 and I'm getting a similar issue; I do have Task Groups in my release pipelines and I'm getting this error when I run the tool:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at CasCap.Utilities.YamlPipelineGenerator.GenSteps(Template template, Dictionary
2 inputs) in //src/CasCap.Apis.AzureDevOps/Utilities/YamlPipelineGenerator.cs:line 390
at CasCap.Utilities.YamlPipelineGenerator.GetSteps(Template template, IDictionary`2 inputs) in //src/CasCap.Apis.AzureDevOps/Utilities/YamlPipelineGenerator.cs:line 386
`
That line refers to task group values:
var filename = $"{template.taskGroup.Name.Sanitize()}-v{template.taskGroup.Version.Major}.yml";
and all my task group names have spaces in ... they do have versions similar to "1.*" so it could be that too.
Oddly, putting in the --inline
switch allows it to work, but it doesn't put the task groups inline in the pipelines - it still generates the task groups in separate files...
I have no errors in my own integration tests (including with task groups) so I can only suggest that you debug this issue for yourself;
{
"profiles": {
"yamlizr": {
"commandName": "Project",
"commandLineArgs": "generate -pat 1111111122222222233333334444444444555555 -org https://dev.azure.com/some_org -proj my_proj -out c:/temp/myoutputfolder"
}
}
}
Note: you can also can install the prior version;
#install last known stable version
dotnet tool update yamlizr --version 1.0.21
#run with old-style arguments (org is a name, not a Uri)
yamlizr generate -pat 1111111122222222233333334444444444555555 -org some_org -proj my_proj -out c:/temp/myoutputfolder
Also getting this error
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.0:00 / 00:00:00
at CasCap.Utilities.YamlPipelineGenerator.GenSteps(Template template, Dictionary`2 inputs) in /_/src/CasCap.Apis.AzureDevOps/Utilities/YamlPipelineGenerator.cs:line 390
One thing that is a possible culprit - the pipeline references an extension that has been removed
Key
Describe the bug Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ at CasCap.Utilities.YamlPipelineGenerator.GenBuildStage() in //src/CasCap.Apis.AzureDevOps/Utilities/YamlPipelineGenerator.cs:line 112 at CasCap.Utilities.YamlPipelineGenerator.GenPipeline() in //src/CasCap.Apis.AzureDevOps/Utilities/YamlPipelineGenerator.cs:line 67 at CasCap.Commands.GenerateCommand.<>cDisplayClass31_4.gProcessDefinition|16(BuildDefinition buildDefinition) in //src/CasCap.DevOpsYamlizrCli/Commands/GenerateCommand.cs:line 241 at CasCap.Commands.GenerateCommand.OnExecuteAsync() in //src/CasCap.DevOpsYamlizrCli/Commands/GenerateCommand.cs:line 223 at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>cDisplayClass0_0.<b 0>d.MoveNext() --- End of stack trace from previous location --- at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken) at CasCap.Program.Main(String[] args) in /_/src/CasCap.DevOpsYamlizrCli/Program.cs:line 33 at CasCap.Program.(String[] args)
Note: It is not only one place as I try to use source code before that time. Did you use the latest API Call? A lot of standard Releases "read" too little values and other parts. For sample, I can see on azure 12 variables but ReleaseDefinition class return only 4.