Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure管道下载相关GitHub发行版_Azure_Github_.net Core_Azure Devops_Azure Pipelines - Fatal编程技术网

Azure管道下载相关GitHub发行版

Azure管道下载相关GitHub发行版,azure,github,.net-core,azure-devops,azure-pipelines,Azure,Github,.net Core,Azure Devops,Azure Pipelines,我已经在Azure DevOps上为我的项目创建了ASP.NET核心管道。 为了成功地构建它,我需要下载github上的一些依赖源存储库 需要有关配置依赖github源的管道yaml的帮助。 构建项目的文件结构应如下所示: Birko.Data // Github repo Birko.Data.Helper // Github repo Birko.Data.ElasticSearch // Github repo Affiliate // Azure dev ops repo -

我已经在Azure DevOps上为我的项目创建了ASP.NET核心管道。 为了成功地构建它,我需要下载github上的一些依赖源存储库

需要有关配置依赖github源的管道yaml的帮助。 构建项目的文件结构应如下所示:

Birko.Data // Github repo 
Birko.Data.Helper // Github repo 
Birko.Data.ElasticSearch // Github repo 
Affiliate  // Azure dev ops repo
  - project sources
  -.sln file
如果我理解正确,所有源代码都会下载到
$(System.ArtifactsDirectory)
,那么Githubs repo需要在父目录中吗

管道定义YAML:

    trigger:
    - master

    pool:
      vmImage: 'windows-latest'

    variables:
      solution: '**/*.sln'
      buildPlatform: 'Any CPU'
      buildConfiguration: 'Release'

    steps:
    - task: DownloadGitHubRelease@0
      displayName: 'Chekout: Birko.Data'
      inputs:
        connection: 'birko-test'
        userRepository: 'birko/Birko.Data'
        defaultVersionType: 'latest'
        downloadPath: '$(System.ArtifactsDirectory)'

    - task: DownloadGitHubRelease@0
      displayName: 'Chekout: Birko.Data.Helper'
      inputs:
        connection: 'birko-test'
        userRepository: 'birko/Birko.Data.Helper'
        defaultVersionType: 'latest'
        downloadPath: '$(System.ArtifactsDirectory)'

    - task: DownloadGitHubRelease@0
      displayName: 'Chekout Birko.Data.ElasticSearch'
      inputs:
        connection: 'birko-test'
        userRepository: 'birko/Birko.Data.ElasticSearch'
        defaultVersionType: 'latest'
        downloadPath: '$(System.ArtifactsDirectory)'

    - task: NuGetToolInstaller@1

    - task: NuGetCommand@2
      inputs:
        restoreSolution: '$(solution)'

    - task: VSBuild@1
      inputs:
        solution: '$(solution)'
        msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'

    - task: VSTest@2
      inputs:
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'

所有源代码都下载到
$(Build.SourcesDirectory)
,这是代理中的
s
文件夹(例如
D:\a\1\s

因此,如果在Azure DevOps repo中,您在存储库根目录中有多个文件夹和文件,您将在文件夹
s
中获得它们,并且根据您的结构,您应该将GitHub repo下载到父文件夹。但是,如果您的Azure DevOps repo中只有一个文件夹,而该文件夹中有更多的文件和文件夹,那么在
s
中,您将只看到该文件夹(包含子文件夹和文件),在这种情况下,您需要将GitHub repo下载到
$(Build.SourcesDirectory)


如果第一种情况是真的,我不建议下载到父文件夹,也许您需要考虑编写一个小的PuthScript脚本,在<代码> S/<代码>中创建一个新文件夹,将所有Azure DeVoP文件移动到那里,然后下载到<代码> S/代码> Github RePs.< /P>谢谢您的响应。你是对的。在移动文件并克隆GitHub存储库之后,构建终于成功了