Commit 828bdef
authored
fix: Publish stage always skipped due to condition evaluation issues (#4094)
Two issues in the Publish stage condition:
1. not(${{ parameters.skipNpmPublish }}) mixes compile-time template
expansion with runtime expression evaluation. The YAML boolean expands
to 'False'/'True' (capital), which are non-empty strings (always truthy
in runtime), so not() always returns false. Fix: use ne() string
comparison instead.
2. stageDependencies.Build.BuildAndPack.outputs['check.hasTarballs'] does
not resolve correctly under 1ES Pipeline Templates, because
templateContext.outputs restructures the job and breaks the output
variable reference path. Fix: remove the cross-stage variable dependency
and verify tarballs exist inside the Publish job after downloading the
artifact.1 parent d49b99b commit 828bdef
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 82 | | |
89 | 83 | | |
90 | 84 | | |
91 | 85 | | |
92 | 86 | | |
93 | | - | |
| 87 | + | |
94 | 88 | | |
95 | 89 | | |
96 | 90 | | |
| |||
113 | 107 | | |
114 | 108 | | |
115 | 109 | | |
116 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
0 commit comments