Closed asizikov closed 3 years ago
@asizikov thank you for taking the time to submit the bug report! Appreciate the details. The current way of creating a stack if one doesn't exist was always just a workaround to using the CLI's built-in way to do it. Ideally, I'd like to update the task extension to simply add the flag to the stack select
command if the user wishes to create a stack. Also see https://github.com/pulumi/pulumi-az-pipelines-task/issues/38.
Describe the bug
createStack:true
should create a new stack when it doesn't exist, however it doesn't work when I use a fully qualified stack name.To Reproduce Steps to reproduce the behavior:
When the
$stackName
variable contains the short name for the stack it works ok, however when I use a fully qualified nameorganization/project/stack-name
my pipeline failes.In logs I can see
Expected behavior
A new stack should be created
Screenshots If applicable, add screenshots to help explain your problem.
Additional context
This feature was introduced in https://github.com/pulumi/pulumi-az-pipelines-task/pull/36
In particular this line: https://github.com/pulumi/pulumi-az-pipelines-task/blob/db5d6c9dc6c42da75eb27fd3a91267f91b9b4f38/buildAndReleaseTask/pulumi.ts#L50
I believe the the comparison is made with the full name, but the actual error message contains a short name. Hence there is no match and the pipeline fails.