rhythmic-vegetable-87369
06/03/2020, 6:19 AMmillions-journalist-34868
06/03/2020, 7:13 AMpulumi stack output
commandrhythmic-vegetable-87369
06/03/2020, 10:41 AMConsole.WriteLine($"##vso[task.setvariable variable=FormExtractor;]{new StackReference("CI").GetOutput("FormExtractor").Apply(u=>u)}");
millions-journalist-34868
06/03/2020, 12:02 PMrhythmic-vegetable-87369
06/03/2020, 12:08 PM[Output] public Output<string> FormExtractor { get; set; }
[Output] public Output<string> Orchestrator { get; set; }
[Output] public Output<string> ConfirmationApi { get; set; }
pulumi stack output
Console.WriteLine($"##vso[task.setvariable variable=FormExtractor;]{new StackReference("matchnetcloud-CI").GetOutput("FormExtractor").Apply(u => u)}");
millions-journalist-34868
06/03/2020, 12:13 PM- script: |
echo "##vso[task.setvariable variable=resourceGroupName;isOutput=true]$(pulumi stack output resourceGroupName)"
echo "##vso[task.setvariable variable=storageAccountName;isOutput=true]$(pulumi stack output storageAccountName)"
echo "##vso[task.setvariable variable=containerName;isOutput=true]$(pulumi stack output containerName)"
rhythmic-vegetable-87369
06/03/2020, 12:18 PMmillions-journalist-34868
06/03/2020, 12:23 PMrhythmic-vegetable-87369
06/03/2020, 12:25 PMmillions-journalist-34868
06/03/2020, 12:27 PMpulumi stack output
and set them in azure pipelines environment variables. you will then use this environment variables as parameter to your azure function deployment taskrhythmic-vegetable-87369
06/03/2020, 12:41 PMpulumi new
to do somillions-journalist-34868
06/03/2020, 12:42 PMtall-librarian-49374
06/03/2020, 12:52 PMpulumi stack output
would be the default suggestion. @rhythmic-vegetable-87369 your original snippet might work if you change the call from GetOutput
to GetValueAsync(…).Result
which doesn’t look nice but returns a plain string, not an output.rhythmic-vegetable-87369
06/03/2020, 2:41 PMerror: the current deployment has 1 resource(s) with pending operations:
2020-06-03T14:37:00.8712250Z * urn:pulumi:CI::matchnetcloud::pulumi:pulumi:StackReference::CI, interrupted while reading
2020-06-03T14:37:00.8712613Z
2020-06-03T14:37:00.8712946Z These resources are in an unknown state because the Pulumi CLI was interrupted while
2020-06-03T14:37:00.8713441Z waiting for changes to these resources to complete. You should confirm whether or not the
2020-06-03T14:37:00.8714068Z operations listed completed successfully by checking the state of the appropriate provider.
2020-06-03T14:37:00.8715290Z For example, if you are using AWS, you can confirm using the AWS Console.
2020-06-03T14:37:00.8715749Z
2020-06-03T14:37:00.8716175Z Once you have confirmed the status of the interrupted operations, you can repair your stack
2020-06-03T14:37:00.8717238Z using 'pulumi stack export' to export your stack to a file. For each operation that succeeded,
2020-06-03T14:37:00.8718603Z remove that operation from the "pending_operations" section of the file. Once this is complete,
2020-06-03T14:37:00.8721480Z use 'pulumi stack import' to import the repaired stack.
2020-06-03T14:37:00.8777659Z
2020-06-03T14:37:00.8778231Z refusing to proceed
var stackReference = new StackReference($"{ Pulumi.Deployment.Instance.StackName }");
Console.WriteLine($"##vso[task.setvariable variable=Orchestrator;]{stackReference.GetValueAsync("Orchestrator").Result}");
Console.WriteLine($"##vso[task.setvariable variable=FormExtractor;]{stackReference.GetValueAsync("FormExtractor").Result}");
Console.WriteLine($"##vso[task.setvariable variable=ConfirmationApi;]{stackReference.GetValueAsync("ConfirmationApi").Result}");
millions-journalist-34868
06/03/2020, 3:42 PMclever-sunset-76585
06/03/2020, 3:43 PMscript
task as @millions-journalist-34868 was eluding to above as well. See https://www.pulumi.com/docs/guides/continuous-delivery/azure-devops/#sample-azure-pipelines-yml for an example of how this is done. Here’s the part about defining output variables (https://www.pulumi.com/docs/guides/continuous-delivery/azure-devops/#user-defined-output-variables).
Here’s the official AzDO docs page about defining variables https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#share-variables-across-pipelinesmysterious-australia-14256
07/28/2020, 9:27 PMclever-sunset-76585
07/28/2020, 9:30 PMpulumi stack ls
in the same folder where your Pulumi.<stack name>.yaml
file exists, where <stack name>
is your stack’s name?mysterious-australia-14256
07/29/2020, 6:58 AMclever-sunset-76585
07/29/2020, 3:04 PM