【发布时间】:2021-08-27 23:07:51
【问题描述】:
这就是我在使用 Jenkins 运行 AWS terraform 计划时得到的结果。下面是我们正在使用的代码
错误:错误:无法删除旧的 terraform 是目录
代码: sh '''设置 +x curl -L 'https://releases.hashicorp.com/terraform/0.11.10/terraform_0.11.10_linux_amd64.zip' --output terraform.zip 解压 -o terraform.zip echo "使用 $(terraform -version) 来自:$(which terraform)" ''' sh "terraform init -backend-config='bucket=${bucketName}'"
詹金斯错误:
+ set +x
after terraform download
Archive: terraform.zip
error: cannot delete old terraform
Is a directory
[Pipeline] End of Pipeline
ERROR: script returned exit code 50
Finished: FAILURE
请提出一些更好的解决方案。
【问题讨论】:
-
Pipeline有解压方法。