not equal condition does not work in azure pipeline template

Copper Contributor

I have a condition to run a task in azure job template conditionally if value of parameter is not null, however the task runs even if value of parameter is null.

 

 

parameters:
- name: 'new_tag_value'
  default: ''
  type: string

  - task: Bash@3
      displayName: 'Update Image tag in helm chart'
      inputs:
        targetType: filePath
        filePath: '${{ parameters.bash_script_path_image_tag_update }}'
        arguments: '${{ parameters.new_tag_value }} ${{ parameters.svc_value_File }}'
      condition: and(succeeded(), ne('${{ parameters.new_tag_value }}', ''))
0 Replies