The problem i am running into is perfectly explained here, but at the time the user was pointed to another forum and no solution is written, if even available...
https://github.com/microsoft/azure-pipelines-yaml/issues/459
In short, my problem is that I have defined a pipeline resource in a YAML Pipeline.
pipelines:
- pipeline: MainRebuild
project: ProjectName
source: 'Main - Rebuild'
branch: feature/DummySmokeTest
trigger:
branches:
- master
- feature/DummySmokeTest
The trigger works great, if the MainRebuild completes as Successful or PartiallySucceeded, a new pipeline is triggered that picks up the right version and can download the right artifacts.
The problem is when queueing the pipeline manually. The default resource configured is "Last successful run", which is indeed what i am looking for.
Only my last run has a result of PartiallySucceeded.
When I do not touch the resource and trigger the build, the build will pick up the latest build with state successful, not the very latest PartiallySucceeded build.
One workaround I found is that when triggering the build manually, I can choose a "different" resource. The pipeline nicely shows me all the Successful and PartiallySucceeded builds and I can choose one. I can choose the latest and say Use the selected run, the pipeline will then also use that properly.
So that is a workaround, but I would like to fix the default behavior of the latest successful to include the partially succeeded builds.
Does anyone know if this is possible?
Update 1:
This my Download build task
# Download build and pipeline artifacts
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'specific'
project: ProjectName
pipeline: '$(RESOURCES.PIPELINE.MAINREBUILD.PIPELINEID)'
specificBuildWithTriggering: true
buildVersionToDownload: specific
buildId: '$(RESOURCES.PIPELINE.MAINREBUILD.RUNID)'
allowPartiallySucceededBuilds: true
downloadType: specific
itemPattern: |
**\Installers\*.exe
downloadPath: '$(System.ArtifactsDirectory)'