@@ -7,7 +7,6 @@ parameters:
7
7
8
8
publishConfig : null
9
9
10
- isInternalServicingValidation : false
11
10
isStandalonePublish : false
12
11
13
12
pool :
@@ -29,54 +28,53 @@ parameters:
29
28
# Publish Images
30
29
# ###############################################################################
31
30
stages :
32
- - ${{ if eq(parameters.isInternalServicingValidation, 'false') }} :
33
- - stage : Publish
34
- ${{ if eq(parameters.isStandalonePublish, true) }} :
35
- dependsOn : []
31
+ - stage : Publish
32
+ ${{ if eq(parameters.isStandalonePublish, true) }} :
33
+ dependsOn : []
34
+ ${{ else }} :
35
+ ${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }} :
36
+ dependsOn : Test
36
37
${{ else }} :
37
- ${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }} :
38
- dependsOn : Test
39
- ${{ else }} :
40
- dependsOn : Post_Build
41
- condition : "
38
+ dependsOn : Post_Build
39
+ condition : "
40
+ and(
41
+ not(canceled()),
42
42
and(
43
- not(canceled()),
44
- and(
45
- contains(variables['stages'], 'publish'),
43
+ contains(variables['stages'], 'publish'),
44
+ or(
46
45
or(
46
+ and(
47
+ and(
48
+ contains(variables['stages'], 'build'),
49
+ succeeded('Post_Build')),
50
+ and(
51
+ contains(variables['stages'], 'test'),
52
+ in(dependencies.Test.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'))),
47
53
or(
48
54
and(
49
- and(
50
- contains(variables['stages'], 'build'),
51
- succeeded('Post_Build')),
55
+ not(contains(variables['stages'], 'build')),
52
56
and(
53
57
contains(variables['stages'], 'test'),
54
58
in(dependencies.Test.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'))),
55
- or(
56
- and(
57
- not(contains(variables['stages'], 'build')),
58
- and(
59
- contains(variables['stages'], 'test'),
60
- in(dependencies.Test.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'))),
59
+ and(
60
+ not(contains(variables['stages'], 'test')),
61
61
and(
62
- not(contains(variables['stages'], 'test')),
63
- and(
64
- contains(variables['stages'], 'build'),
65
- succeeded('Post_Build'))))),
66
- not(
67
- or(
68
- contains(variables['stages'], 'build'),
69
- contains(variables['stages'], 'test'))))))"
70
- jobs :
71
- - template : /eng/common/templates/jobs/publish.yml@self
72
- parameters :
73
- pool : ${{ parameters.pool }}
74
- internalProjectName : ${{ parameters.internalProjectName }}
75
- publishConfig : ${{ parameters.publishConfig }}
76
- customPublishVariables : ${{ parameters.customPublishVariables }}
77
- customInitSteps : ${{ parameters.customPublishInitSteps }}
78
- sourceBuildPipelineDefinitionId : ${{ parameters.sourceBuildPipelineDefinitionId }}
79
- sourceBuildPipelineRunId : ${{ parameters.sourceBuildPipelineRunId }}
80
- versionsRepoRef : ${{ parameters.versionsRepoRef }}
81
- versionsRepoPath : ${{ parameters.versionsRepoPath }}
82
- overrideImageInfoCommit : ${{ parameters.overrideImageInfoCommit }}
62
+ contains(variables['stages'], 'build'),
63
+ succeeded('Post_Build'))))),
64
+ not(
65
+ or(
66
+ contains(variables['stages'], 'build'),
67
+ contains(variables['stages'], 'test'))))))"
68
+ jobs :
69
+ - template : /eng/common/templates/jobs/publish.yml@self
70
+ parameters :
71
+ pool : ${{ parameters.pool }}
72
+ internalProjectName : ${{ parameters.internalProjectName }}
73
+ publishConfig : ${{ parameters.publishConfig }}
74
+ customPublishVariables : ${{ parameters.customPublishVariables }}
75
+ customInitSteps : ${{ parameters.customPublishInitSteps }}
76
+ sourceBuildPipelineDefinitionId : ${{ parameters.sourceBuildPipelineDefinitionId }}
77
+ sourceBuildPipelineRunId : ${{ parameters.sourceBuildPipelineRunId }}
78
+ versionsRepoRef : ${{ parameters.versionsRepoRef }}
79
+ versionsRepoPath : ${{ parameters.versionsRepoPath }}
80
+ overrideImageInfoCommit : ${{ parameters.overrideImageInfoCommit }}
0 commit comments