【发布时间】:2019-01-15 18:59:11
【问题描述】:
我正在尝试在 VSTS (Azure DevOps) 到 Azure WebApp 的帮助下为 Github 上的项目创建 CI/CD 管道。
我正处于流程的开始阶段,我一直坚持让我的项目直接在 VSTS 中构建。
后端项目为DotNetCore项目,前端尚未确定。
我在 github 上的存储库看起来像这样
/
-> Project.FrondEnd
-> Project.BackEnd
-> Documents
-> .gitignore
-> readme.md
在文件夹 Project.BackEnd 中它看起来像:
/Project.BackEnd
-> Project.Api (Entry point of the server app)
-> Project.Entities
-> Project.DataAccess
-> Project.Services
-> Project.sln
当我在 VSTS 上配置管道时,我需要编写 pipeline.yml 文件,但似乎我缺少一些关于如何指向我的服务器入口点以便它可以构建项目的知识!
这是我的 yml 文件
trigger:
- master
pool:
vmImage: 'vs2017-win2016'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
那样它不起作用,我收到这条消息:
错误 MSB1003:指定项目或解决方案文件。当前工作目录不包含项目或解决方案文件。
我已尝试将步骤更改为类似的内容
steps:
- script: dir
workingDirectory: $(Agent.BuildDirectory)
displayName: List contents of a folder
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
但我得到了我所在的目录:
/
-> a
-> b
-> s
-> TestResult
我有点迷茫……
那么我怎样才能从我的 github 下的 Project.BackEnd 获取源代码并构建它以便我可以继续下一步!?
【问题讨论】:
标签: azure-devops azure-pipelines