简体   繁体   English

travis-ci 无法解析 yml 文件

[英]travis-ci could not parse yml file

I want to do AWS Elastic Beanstalk Deployment.我想做 AWS Elastic Beanstalk 部署。 But tvavis say "could not parse" This happens after adding the part of the code that begins with the word "deploy"但是 tvavis 说“无法解析”这发生在添加以“部署”开头的代码部分之后

sudo: required
services:
    - docker
before_install:
    - docker build -t alex-sbk/docker-react -f Dockerfile.dev .

script:
    - docker run -e CI=true alex-sbk/docker-react npm run test 

    deploy:
    provider: elasticbeanstalk
    region: "us-east-2"
    app: "docker-react"
    env: "DockerReact-env"
    bucket_name: "elasticbeanstalk-us-east-2-282895571233"
    bucket_path: "docker-react"
    on:
        branch: master
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY

There are apparent issues with indentations .有明显的缩进问题。 You code does not pass YAML format validators.您的代码未通过YAML 格式验证器。 I fixed it a bit, and now it passes我修复了一点,现在它通过了

--- 
before_install: 
  - "docker build -t alex-sbk/docker-react -f Dockerfile.dev ."
script: 
  - "docker run -e CI=true alex-sbk/docker-react npm run test"
  - 
    deploy: 
      access_key_id: $AWS_ACCESS_KEY
      app: docker-react
      bucket_name: elasticbeanstalk-us-east-2-282895571233
      bucket_path: docker-react
      env: DockerReact-env
      provider: elasticbeanstalk
      region: us-east-2
      secret_access_key: $AWS_SECRET_KEY
      true: 
        branch: master
services: 
  - docker
sudo: required

The format should be OK now, but I can't guarantee that the deployment will successed.现在格式应该没问题,但我不能保证部署会成功。 There could be other issue with actual data provided.提供的实际数据可能存在其他问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取 https://api.[mycluster]/api?timeout=32s: x509: 由未知权威签名的证书,使用 kops 和 Travis-CI 在 AWS 上创建的 Kubernetes 集群 - Get https://api.[mycluster]/api?timeout=32s: x509: certificate signed by unknown authority, Kubernetes cluster created on AWS using kops and Travis-CI 向.travis.yml文件添加更多配置后,TravisCI没有运行 - TravisCI did not run after adding more configuration to .travis.yml file Travis CI 部署到 AWS ElasticBeanstalk - Travis CI Deploy to AWS ElasticBeanstalk 通过 travis ci 在 eks 上部署失败 - deploying on eks via travis ci fails 无法使用 travis ci 在 elasticbeanstalk 中部署 docker 应用程序 - unable to deploy docker application in elasticbeanstalk using travis ci Travis CI 构建失败 - (Aws::S3::Errors::SignatureDoesNotMatch) - Travis CI build failed - (Aws::S3::Errors::SignatureDoesNotMatch) Travis CI部署:无效选项“--secret_access_key =” - Travis CI deploy: invalid option “--secret_access_key=” Travis CI无法访问AWS中的MySQL RDS实例 - Travis CI fails to access MySQL RDS instance in AWS 带有Travis CI部署的带有AWS Lambda Python 2.7的枚举模块 - Enum Module with AWS Lambda Python 2.7, Deployed with Travis CI 使用travis CI自动触发AWS lambda function? - Use travis CI to automatically trigger AWS lambda function?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM