[Ci]: Fix to trigger the publish pipeline in failure build issue (#10847)
Why I did it It is not necessary to trigger the publish pipeline when build is failed. How I did it Remove the condition in the azp task, change to use template condition.
This commit is contained in:
parent
4fd629c021
commit
f6927606b3
@ -58,10 +58,11 @@ jobs:
|
||||
condition: failed()
|
||||
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)$(System.JobAttempt)'
|
||||
displayName: "Archive failed sonic image"
|
||||
- template: trigger-publish-artifacts-build.yml
|
||||
parameters:
|
||||
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
|
||||
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
|
||||
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
||||
- template: trigger-publish-artifacts-build.yml
|
||||
parameters:
|
||||
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
|
||||
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
|
||||
- ${{ parameters.postSteps }}
|
||||
- template: cleanup.yml
|
||||
jobGroups: ${{ parameters.jobGroups }}
|
||||
|
@ -20,10 +20,8 @@ steps:
|
||||
echo "##vso[task.setvariable variable=sonic_version]$sonic_version"
|
||||
echo "##vso[task.setvariable variable=latest_tag]$latest_tag"
|
||||
echo "##vso[task.setvariable variable=docker_tags]$docker_tags"
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
displayName: 'Set trigger build variables'
|
||||
- task: TriggerBuild@4
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
inputs:
|
||||
definitionIsInCurrentTeamProject: false
|
||||
teamProject: internal
|
||||
|
Loading…
Reference in New Issue
Block a user