我是Circleci的新成员,我试图将构建限制为仅在特定分支上工作,我尝试了下面的配置文件,但当我包含过滤器部分时,会得到以下错误:
Your config file has errors and may not run correctly:
2 schema violations found
required key [jobs] not found
required key [version] not found
配置过滤器:
version: 2
jobs:
provisioning_spark_installation_script:
working_directory: ~/build_data
docker:
- image: circleci/python:3.6.6-stretch
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run: &install_awscli
name: Install AWS CLI
command: |
sudo pip3 install --upgrade awscli
- run: &login_to_ecr
name: Login to ECR
command: aws ecr get-login --region us-east-1 | sed 's/-e none//g' | bash
workflows:
version: 2
deployments:
jobs:
- provisioning_spark_installation_script
filters:
branches:
only: master
当我移除过滤器部分时,一切都运行良好——但是没有过滤器,我知道如何使用shell解决问题,如果没有,但它就不那么优雅了。
有什么建议吗?