kinda stuck at this point and haven't been able to find any clear documentation for this example.
I have some parameters to a YAML pipeline shown below (SonarProjectKey & sonarProjectName). I am trying to set a variable to either true or false depending on whether these params have a value.
I have set them to initial values of ' ' deliberately so that you can run the pipeline without having to provide a value.
The following example doesnt work:
parameters:
- name: sonarProjectKey # Sonar project key parameter
displayName: Sonar Project Key
default: ' '
- name: sonarProjectName
displayName: Sonar Project Name
default: ' '
variables:
- name: runSonarAnalysis
value: $[and( not(eq('${{ parameters.sonarProjectKey }}', '')), not(eq('${{ parameters.sonarProjectName }}', '')))]
I have trued so many different ways and can't seem to get it to work.
Someone please help!