Open algattik opened 4 years ago
Yep, I'm getting a similar error. I suspect the task is refusing to get stdout of the script it runs.
I also spent several hours trying to solve a nonexistent problem with my agent before realizing I had a slight typo in the working directory name.
Had the following error in the debug logs. Please either fix or document this.
##[debug]arguments:
##[debug] init
##[debug] -backend-config=storage_account_name=**redacted**
##[debug] -backend-config=container_name=**redacted**
##[debug] -backend-config=key=**redacted**
##[debug] -backend-config=resource_group_name=**redacted**
##[debug] -backend-config=arm_subscription_id=**redacted**
##[debug] -backend-config=arm_tenant_id=***
##[debug] -backend-config=arm_client_id=***
##[debug] -backend-config=arm_client_secret=***
/opt/tfsagent/ad1/_work/_tool/terraform/0.12.24/x64/terraform init -backend-config=storage_account_name=**redacted** -backend-config=container_name=**redacted**-backend-config=key=**redacted** -backend-config=resource_group_name=**redacted** -backend-config=arm_subscription_id=**redacted** -backend-config=arm_tenant_id=*** -backend-config=arm_client_id=*** -backend-config=arm_client_secret=***
##[debug]task result: Failed
##[error]Error: There was an error when attempting to execute the process '/opt/tfsagent/ad1/_work/_tool/terraform/0.12.24/x64/terraform'. This may indicate the process failed to start. Error: spawn /opt/tfsagent/ad1/_work/_tool/terraform/0.12.24/x64/terraform ENOENT
##[debug]Processed: ##vso[task.issue type=error;]Error: There was an error when attempting to execute the process '/opt/tfsagent/ad1/_work/_tool/terraform/0.12.24/x64/terraform'. This may indicate the process failed to start. Error: spawn /opt/tfsagent/ad1/_work/_tool/terraform/0.12.24/x64/terraform ENOENT
##[debug]Processed: ##vso[task.complete result=Failed;]Error: There was an error when attempting to execute the process '/opt/tfsagent/ad1/_work/_tool/terraform/0.12.24/x64/terraform'. This may indicate the process failed to start. Error: spawn /opt/tfsagent/ad1/_work/_tool/terraform/0.12.24/x64/terraform ENOENT
Finishing: terraformInit
I would assume the error comes from terraform cannot be executed in a directory that does not exist.
I would rather add an additional verification the workingDirectory does actually exist!
+1, just bumped against this - would be great to have a more helpful error message when this happens.
The error message is misleading. The problem is actually that Terraform can't find your TF file. We should manually add "-check: self" to the Task of "terraform init"; For Example: ....... steps: - checkout: self
Pipeline YAML:
Output:
Expected error message: