在VB6构建之后,如何在Azure Devops中设置复制文件任务?
回应 到目前为止,我已经成功地创建了以下构建管道在VB6构建之后,如何在Azure Devops中设置复制文件任务?,vb6,azure-pipelines,Vb6,Azure Pipelines,回应 到目前为止,我已经成功地创建了以下构建管道 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
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:\dev\hello'
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'
当我运行它时,会在代理上创建.EXE
接下来,我想将.EXE和.dll复制到Azure存储位置
我知道我需要先使用“复制文件”任务,然后再使用“发布”任务
我正在尝试使用设计器来找出复制文件任务的YAML
但我不知道该说什么。目标文本框不允许输入
[更新]
经过学习,我能够添加以下任务
但是,不会复制任何文件
- task: CopyFiles@2
inputs:
contents: '*c:\dev\hello\*.exe*'
targetFolder: c:\dev\out2
其中c:\dev\hello是项目在生成代理上的位置
[更新]
允许多种文件类型的更好的表示法是
- task: CopyFiles@2
inputs:
SourceFolder: c:\dev\hello
contents: |
*.exe
*.dll
targetFolder: c:\dev\out2
奇怪的你设置了什么,只是一个新的管道和新的复制任务吗?创建一个新的怎么样?对于复制文件任务,您可以从以下位置查看详细信息:Thank@LeoLiu MSFT我更新了问题下一个问题
- task: CopyFiles@2
inputs:
SourceFolder: c:\dev\hello
contents: |
*.exe
*.dll
targetFolder: c:\dev\out2