I have a number of subfolders in a repository that all contain an Azure ARM template (folder name = resource group).
I'm trying to iterate each folder and then create a pipeline artifact from contents of that folder.
How do I invoke a devops task from PowerShell script? The script below gives an error saying that PublishPipelineArtifact
task is not found.
foreach ($folder in (Get-ChildItem -Path $env:SYSTEM_DEFAULTWORKINGDIRECTORY -Directory -ErrorAction SilentlyContinue | Select-Object Name))
{
Write-Host "Processing folder $($folder.Name)..."
Write-Host "##vso[task.PublishPipelineArtifact targetPath=$folder;artifactName=$($folder.Name);]"
Write-Host "Published artifact $($folder.Name)..."
}