Closed mathiasi closed 1 year ago
Hi, thanks for the report. Could you share the definition? At least some parts of it?
I managed to narrow it down and I think it is related to the Publish-task (not sure if that is the only one though). This definition fails for me:
public class TestPipeline : SingleStagePipelineDefinition
{
public override string TargetFile => "eng/pr.yml";
public override TargetPathType TargetPathType => TargetPathType.RelativeToGitRoot;
public override SingleStagePipeline Pipeline => new()
{
Jobs = new()
{
Job("foo") with
{
Steps = new()
{
Publish("artifactName", "some/file/path.txt")
}
}
}
};
}
Thanks for spending time on this, I will have a look tomorrow. There were quite a lot of changes so it's possible there's a regression.
@mathiasi I found the issue to be here: https://github.com/sharpliner/sharpliner/blob/c0bf72f5b9083fecf068c19aaf13f7df6ad6e277/src/Sharpliner/AzureDevOps/AzureDevOpsDefinition.cs#L281
I will push a new fixed version of the library but there is also a workaround possible if you provide display name to the Publish task.
I can confirm that it worked for the case of the PublishTask however I came across another case:
Task("CopyFiles@2") with
{
Inputs = new()
{
{ "contents", "path/to/content"},
{ "targetFolder", "path/to/target" }
}
};
which used to be valid since the displayName parameter of Task is optional. However it seems to suffer from the same as the PublishTask.
Oh yeah, another NRE.. Thanks! I should have looked for all places like that.
Fix will be in 1.5.2 shortly.
I have a project that was using 1.4.12 however when I update to the latest 1.5.0 and build the exact the project I get the following error: