我正在尝试使用 GitHub、Travis CI 和 AWS ECS 创建 CI 管道。当我将提交推送到 master 分支时,我在 travis CI 中遇到错误:'Could not parse .travis.yml'。我想不通,问题出在哪里。Travis 没有提供有关错误的更多信息。
有一个代码,我正在使用:
.travis.yml
language: csharp
dist: trusty
sudo: required
mono: none
dotnet: 2.0.0
branches:
only:
- master
before_script:
- chmod -R a+x scripts
script:
- ./scripts/dotnet-build.sh
- ./scripts/dotnet-publish.sh
- ./scripts/docker-publish-travis.sh
dotnet-build.sh
dotnet restore
dotnet build
dotnet-publish.sh
dotnet publish ./BookMeMobi2 -c Release -o ./bin/Docker
dotnet-publish-travis.sh
pip install --user awscli
eval $(aws ecr get-login --no-include-email --region eu-central-1)
docker build -t bookmemobi2 .
docker ps
docker tag bookmemobi2:latest 601510060817.dkr.ecr.eu-central-1.amazonaws.com/bookmemobi2:latest
docker push 601510060817.dkr.ecr.eu-central-1.amazonaws.com/bookmemobi2:latest
我不知道问题出在哪里。你可以帮帮我吗?