Reputation: 18170
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:\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'
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:\dev\hello\*.exe*'
targetFolder: c:\dev\out2
Upvotes: 1
Views: 22837
Reputation: 18170
- task: CopyFiles@2
inputs:
SourceFolder: c:\dev\hello
contents: '**.exe*'
targetFolder: c:\dev\out2
where c:\dev\hello 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:\dev\hello
contents: |
*.exe
*.dll
targetFolder: c:\dev\out2
Upvotes: 3