@@ -70,7 +70,12 @@ module(CORE_PIPELINE_CONFIG_STAGES_PIPELINE_PIPELINESTAGE, [])
70
70
$scope . applications = _ . map ( applications , 'name' ) . sort ( ) ;
71
71
initializeMasters ( ) ;
72
72
} ) ;
73
-
73
+ const isExpression =
74
+ $scope . stage . pipelineParameters !== undefined &&
75
+ $scope . stage . pipelineParameters !== null &&
76
+ typeof $scope . stage . pipelineParameters === 'string'
77
+ ? $scope . stage . pipelineParameters . startsWith ( '${' ) && $scope . stage . pipelineParameters . endsWith ( '}' )
78
+ : false ;
74
79
function initializeMasters ( ) {
75
80
if ( $scope . stage . application && ! $scope . stage . application . includes ( '${' ) ) {
76
81
PipelineConfigService . getPipelinesForApplication ( $scope . stage . application ) . then ( function ( pipelines ) {
@@ -130,12 +135,14 @@ module(CORE_PIPELINE_CONFIG_STAGES_PIPELINE_PIPELINESTAGE, [])
130
135
( value , name ) => ! acceptedPipelineParams . includes ( name ) ,
131
136
) ;
132
137
}
133
-
134
- $scope . hasInvalidParameters = ( ) => Object . keys ( $scope . invalidParameters || { } ) . length ;
138
+ $scope . hasSpeLDefinedParameterBlock = ( ) => isExpression ;
139
+ $scope . hasInvalidParameters = ( ) => Object . keys ( ( $scope . invalidParameters && ! isExpression ) || { } ) . length ;
135
140
$scope . useDefaultParameters = { } ;
136
141
_ . each ( $scope . pipelineParameters , function ( property ) {
137
- if ( ! ( property . name in $scope . stage . pipelineParameters ) && property . default !== null ) {
138
- $scope . useDefaultParameters [ property . name ] = true ;
142
+ if ( ! isExpression ) {
143
+ if ( ! ( property . name in $scope . stage . pipelineParameters ) && property . default !== null ) {
144
+ $scope . useDefaultParameters [ property . name ] = true ;
145
+ }
139
146
}
140
147
} ) ;
141
148
} else {
0 commit comments