我正在开发一个 CI/CD 项目(使用 Circleci 管道),目前,我一直致力于让我的“create_infrastruction”工作正常工作。下面是工作内容
# AWS infrastructure
create_infrastructure:
docker:
- image: amazon/aws-cli
steps:
- checkout
- run:
name: Ensure backend infrastructure exist
command: |
aws cloudformation deploy \
--template-file template.yml \
--stack-name my-stack
当我运行上面的作业时,它返回无效的模板路径 template.yml
- 我应该将
template.yml
文件保存在哪里? - 我将其放置在项目 GitHub 存储库中与
config.yml
相同的位置(这是正确的吗?) - 问题可能出在我的工作中的
--template-file template.yml
行吗? (我是这里的初学者)。 拜托,我需要帮助。
最佳答案
实际上,我拼错了 GitHub 存储库中找到的模板名称。我改正后一切都很好。 但我认为这个错误根本不明确,我期待类似“在指定的路径中找不到模板”的内容,而不是“无效的模板路径 template.yml”
关于devops - Circleci config.yml : 'Invalid template path template.yml' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62766116/