pulumi / pulumi-az-pipelines-task

Azure Pipelines task extension for running Pulumi apps.
https://marketplace.visualstudio.com/publishers/pulumi
Apache License 2.0
27 stars 19 forks source link

Error: spawn /home/vsts/work/_temp/.../pulumi/pulumi ENOENT #42

Closed StefH closed 4 years ago

StefH commented 4 years ago

I've this YAML task:

- task: pulumi.build-and-release-task.custom-build-release-task.Pulumi@1
      displayName: 'Run pulumi - preview'
      inputs:
        azureSubscription: 'Service Connection for Static Websites'
        command: preview
        cwd: "Pulumi"
        stack: "StefH/blazor-wasm-static-website/dev"
      env:
        PULUMI_ACCESS_TOKEN: $(PULUMI_ACCESS_TOKEN)

But this fails on Azure Pipelines:

Starting: Run pulumi - preview
==============================================================================
Task         : Pulumi Azure Pipelines Task
Description  : Azure Pipelines task extension for running Pulumi apps.
Version      : 1.0.6
Author       : Pulumi
Help         : Join us on Slack at https://slack.pulumi.com.
==============================================================================
Downloading: https://get.pulumi.com/releases/sdk/pulumi-v2.1.0-linux-x64.tar.gz
Extracting archive
/bin/tar xzC /home/vsts/work/_temp/015b0843-4dfa-4c90-84d3-2aed7d13dd4c -f /home/vsts/work/_temp/46ea1f82-dbfc-495e-8875-0af355e69860
Prepending PATH environment variable with directory: /home/vsts/work/_temp/015b0843-4dfa-4c90-84d3-2aed7d13dd4c/pulumi
/home/vsts/work/_temp/015b0843-4dfa-4c90-84d3-2aed7d13dd4c/pulumi/pulumi version
v2.1.0

/home/vsts/work/_temp/015b0843-4dfa-4c90-84d3-2aed7d13dd4c/pulumi/pulumi login
Logging in using access token from PULUMI_ACCESS_TOKEN
Logged into pulumi.com as StefH (https://app.pulumi.com/StefH)

/home/vsts/work/_temp/015b0843-4dfa-4c90-84d3-2aed7d13dd4c/pulumi/pulumi stack select StefH/blazor-wasm-static-website/dev
##[error]Error: There was an error when attempting to execute the process '/home/vsts/work/_temp/015b0843-4dfa-4c90-84d3-2aed7d13dd4c/pulumi/pulumi'. This may indicate the process failed to start. Error: spawn /home/vsts/work/_temp/015b0843-4dfa-4c90-84d3-2aed7d13dd4c/pulumi/pulumi ENOENT

Finishing: Run pulumi - preview
praneetloke commented 4 years ago

@StefH I see that you set the cwd input to Pulumi. Are you certain that that is the folder where your Pulumi.yaml and Pulumi.dev.yaml are located?

StefH commented 4 years ago

Good point, you are correct.

I need to use cwd: src/Pulumi