Closed
Description
openedon Apr 21, 2021
Describe the bug
When the versionSpec
input is configured to 3.0.0
, the first run caches the cli, and the subsequent looks for the cli on PATH but fails.
To Reproduce
Steps to reproduce the behavior:
- Configure a pulumi config task as below:
- task: Pulumi@1
displayName: Pulumi config
env:
AZURE_STORAGE_ACCOUNT: $(pulumiStateStorageAccount)
AZURE_STORAGE_KEY: $(pulumiStateStorageAccountKey)
PULUMI_CONFIG_PASSPHRASE: $(pulumiSecret)
PULUMI_SELF_MANAGED_STATE_LOCKING: 1
inputs:
azureSubscription: '$(azureSubscription)'
command: 'config'
loginArgs: 'azblob://$(pulumiStateContainer)'
stack: 'my-stack'
versionSpec: '3.0.0'
createStack: true
- Run the task. The first execution downloads the tool and caches it:
Downloading: https://get.pulumi.com/releases/sdk/pulumi-v3.0.0-linux-x64.tar.gz
Extracting archive
/usr/bin/tar xC /azp/agent/_work/_temp/2f278ff1-a72c-49f7-9278-65e3e388xxxx -f /azp/agent/_work/_temp/44fa164e-c998-4f35-bbf3-10d64b65xxxx
Prepending PATH environment variable with directory: /azp/agent/_work/_temp/2f278ff1-a72c-49f7-9278-65e3e388xxxx/pulumi
Caching tool: pulumi 3.0.0 x64
/azp/agent/_work/_temp/2f278ff1-a72c-49f7-9278-65e3e388xxxx/pulumi/pulumi version
v3.0.0
- Run the task again. This time the task looks for the tool in cache and finds it. It prepends a folder to path. But the task then runs a
which
command that is not able to find the cli on path and gives this output:
Found tool in cache: pulumi 3.0.0 x64
Prepending PATH environment variable with directory: /azp/agent/_work/_tool/pulumi/3.0.0/x64
##[error]Pulumi CLI does not seem to be installed in your environment.
- Removing
versionSpec
fixes it, as it doesn't look for the cached tool.
Expected behavior
Adding the cache path to $PATH should have made the cli available to the task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment