circleci config.yml: 'Invalid template path template.yml'

Viewed 2496

I am working on a CI/CD project(Using circleci pipeline) and currently, I am stuck on getting my "create_infrastructure" job to work. Below is the job

    # 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

When I run the job above, it returns Invalid template path template.yml

  • Where am I suppose to keep the template.yml file?
  • I placed it in the same location as the config.yml in the project's GitHub repository(Is this right?)
  • Could the problem on the line --template-file template.yml in my job? (I am a beginner here). Please I need help.
1 Answers

I actually misspelled the name of the template found in my GitHub repository. Everything worked well after I correct it. But I think this error was not explicit at all, I was expecting something like 'template not found in the path specified', instead of 'Invalid template path template.yml'

Related