@@ -70,7 +70,12 @@ module(CORE_PIPELINE_CONFIG_STAGES_PIPELINE_PIPELINESTAGE, [])
7070 $scope . applications = _ . map ( applications , 'name' ) . sort ( ) ;
7171 initializeMasters ( ) ;
7272 } ) ;
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 ;
7479 function initializeMasters ( ) {
7580 if ( $scope . stage . application && ! $scope . stage . application . includes ( '${' ) ) {
7681 PipelineConfigService . getPipelinesForApplication ( $scope . stage . application ) . then ( function ( pipelines ) {
@@ -130,12 +135,14 @@ module(CORE_PIPELINE_CONFIG_STAGES_PIPELINE_PIPELINESTAGE, [])
130135 ( value , name ) => ! acceptedPipelineParams . includes ( name ) ,
131136 ) ;
132137 }
133-
134- $scope . hasInvalidParameters = ( ) => Object . keys ( $scope . invalidParameters || { } ) . length ;
138+ $scope . hasSpeLDefinedParameterBlock = ( ) => isExpression ;
139+ $scope . hasInvalidParameters = ( ) => Object . keys ( ( $scope . invalidParameters && ! isExpression ) || { } ) . length ;
135140 $scope . useDefaultParameters = { } ;
136141 _ . 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+ }
139146 }
140147 } ) ;
141148 } else {
0 commit comments