gitlab - 单个 GitLab CI 作业的多个 terraform 报告
问题描述
有没有人尝试上传由具有多个计划输出的单个作业生成的 terraform 报告工件?
例子:
terraform:plan:
image: my-tf-container
stage: terraform
tags: [docker]
script:
- |
echo -e '{
"create": 0,
"update": 2,
"delete": 0
}' > ./plan-summary-0.json
- |
echo -e '{
"create": 1,
"update": 2,
"delete": 4
}' > ./plan-summary-1.json
artifacts:
reports:
terraform:
- "./plan-summary-0.json"
- "./plan-summary-1.json"
在管道日志中,我收到以下错误:
Uploading artifacts...
./plan-summary-0.json: found 1 matching files and directories
./plan-summary-1.json: found 1 matching files and directories
WARNING: Uploading artifacts as "terraform" to coordinator... failed id=164225 responseStatus=500 Internal Server Error status=500 token=******
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "terraform" to coordinator... failed id=164225 responseStatus=500 Internal Server Error status=500 token=*****
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "terraform" to coordinator... failed id=164225 responseStatus=500 Internal Server Error status=500 token=*****
FATAL: invalid argument
Cleaning up file based variables
00:01 ERROR: Job failed: exit code 1
解决方案
从 gitlab 文档看起来不太可能,这是多个报告的示例(同时保持 gitlab ci yaml 优化):https ://docs.gitlab.com/ee/user/infrastructure/mr_integration.html#multiple-terraform-plan -报告
推荐阅读
- mysql - 如果另一列具有重复值,则sql查询用相同的值替换列
- reactjs - 使用 JsonConvert 将 JSON 响应转换为 TypeScript 对象在所有情况下都有效,但一种情况除外
- c++ - 旧版打印驱动程序模糊
- here-api - HERE 优化路线与转弯指示
- google-apps-script - FormApp - switch 语句的替代方案?
- python - Flask 在 Linux 服务器上找不到 Pandoc (nginx+uwsgi)
- python-3.x - What exceptions can be raised by `load_kube_config`?
- javascript - Postman Accesstoken 自动刷新问题
- visual-studio - Visual Studio 2017:在路径中找不到和或未创建 Exe
- css - 设计材料表以匹配设计