circle ci error: 0 subschemas matched instead of one

问题描述 投票:0回答:0

我的工作定义:

spinup-database-with-latest-data:

working_directory: ~/restore
docker:
  - image: xxxxxxx/postgres-bash:jq-curl-tf
steps: 
    - attach_workspace:
       at: .
    - run: 
        command: cat bash.env > $BASH_ENV     
    - run:
        command: ./scripts/stagingCopyLatestDB.sh <<staging_db_host>> <<staging_db_port>> <<staging_db_name>> <<staging_db_pwd>> <<staging_db_user>> <<staging_mech_id>> $restore_s3_bucket
        when: equal("staging", "$restore_env" )           
    - run:
            command: |
               current_date=$(date -d "yesterday" +"%d-%m-%Y")
               cd ./terraform/tf-main && terraform apply -var "backup_date=${current_date}" 
               cd ./terraform/tf-main && export TF_OUTPUT="$(terraform output -json)" 
               echo "export shadow_prod_db_endpoint=$(echo $TF_OUTPUT | jq -r '.restore_db_connect_endpoint.value')" >>$BASH_ENV
               echo "export shadow_prod_db_port=$(echo $TF_OUTPUT | jq -r '.restore_db_connect_port.value')" >>$BASH_ENV
               echo "export shadow_prod_db_user=$(echo $TF_OUTPUT | jq -r '.restore_db_connect_username.value')" >>$BASH_ENV
               echo "export shadow_prod_db_password=$(echo $TF_OUTPUT | jq -r '.restore_db_connect_password.value')" >>$BASH_ENV
               echo "export shadow_prod_db_host=$(echo $backup_db_endpoint|cut -d ':' -f1-)" >>$BASH_ENV 
               cp $BASH_ENV bash.env      
            when: equal("prod", "$restore_env")       
                   
    - run:
            command: exit 0
            when: equal("noinsert", "$restore_env")               
    - persist_to_workspace:
      root: .
      paths:
        - bash.env              

我面临的错误:

ERROR IN CONFIG FILE:
[#/jobs/spinup-database-with-latest-data] 0 subschemas matched instead of one
1. [#/jobs/spinup-database-with-latest-data] only 1 subschema matches out of 2
|   1. [#/jobs/spinup-database-with-latest-data/steps/5] 0 subschemas matched instead of one
|   |   1. [#/jobs/spinup-database-with-latest-data/steps/5] 3 schema violations found

不明白这个问题,因为我是圈子 ci 的新手。请帮助

理想情况下,此配置应该有效。但它不是

yaml circleci cicd
© www.soinside.com 2019 - 2024. All rights reserved.