如何在 VB6 构建后在 Azure Devops 中设置复制文件任务? [英] How do I set up the Copy Files Task in Azure Devops after a VB6 build?

查看:26
本文介绍了如何在 VB6 构建后在 Azure Devops 中设置复制文件任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

针对 但我不知道该放什么.目标文本框不允许输入.

[更新]

学习帮助但是没有文件被复制.

 - 任务:CopyFiles@2输入:内容:'*c:devhello*.exe*'目标文件夹:c:devout2

解决方案

 - task: CopyFiles@2输入:源文件夹:c:devhello内容:'**.exe*'目标文件夹:c:devout2

其中 c:devhello 是项目在构建代理上的位置

[更新]

允许多种文件类型的更好的表示法是

- 任务:CopyFiles@2输入:源文件夹:c:devhello内容:|*.可执行程序*.dll目标文件夹:c:devout2

In response to this question about making an Azure build pipeline for a VB6 project

I have managed to create the following Build Pipeline so far

pool:
  name: Default
steps:
- script: |
   echo Write your commands here

   echo Use the environment variables input below to pass secret variables to this script
  vb6.exe /m /out errors.txt Project1.vbp
  workingDirectory: 'C:devhello'
  failOnStderr: true
  displayName: vb6

- powershell: |
   # Write your powershell commands here.

   Write-Host "Hello World"

   # Use the environment variables input below to pass secret variables to this script.


   if(Test-Path .errors.txt)
   {
      $file = Get-Content .errors.txt 
      Remove-Item .errors.txt

      if($file | Select-String "succeeded." -quiet) { exit 0 }

      $file | Where-Object {Write-Host "##vso[task.logissue type=error]$_"}
   }
  displayName: 'PowerShell Script'

When I run it, the .EXE does get created on the Agent.

Next I want to copy the .EXE and .DLLs to an Azure Storage location.

I understand I need to use the Copy Files Task and then a Publish Task.

I am trying to use the designer to figure out the YAML for the Copy Files Task

but I don't know what to put. The target text box is not allowing input.

[Update]

I have been able to add the following task after studying the help However no files get copied.

  - task: CopyFiles@2
  inputs:
    contents: '*c:devhello*.exe*' 
    targetFolder: c:devout2

解决方案

  - task: CopyFiles@2
  inputs:
    SourceFolder: c:devhello
    contents: '**.exe*'
    targetFolder: c:devout2

where c:devhello is the location of the project on the build agent

[Update]

And a nicer notation that allows for multiple file types is

- task: CopyFiles@2
  inputs:
    SourceFolder: c:devhello
    contents:  |
              *.exe
              *.dll
    targetFolder: c:devout2

这篇关于如何在 VB6 构建后在 Azure Devops 中设置复制文件任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆