Skip to content

Body assigned value from powershell task variable always seen as nothing in it #57

Description

@eliassal

Hi, I started your sendemail which worked fine until I started to populate the body by a value from a prcedent powershell task in which I initialize the variable.

In send email I do this
Body: "To test variable value: $({getIssues}.alertSonarIssues)"

and the variable is populated in the PS task as follows

- powershell: |
   Write-Host "calling sonar to see how many issues"
......
     Write-Host "##vso[task.setvariable variable=alertSonarIssues;isOutput=true;]$allMajorissuesOnlyIssues"
.......
  name: 'getIssues'
  displayName: 'GetAllIssues'

When I do Write-host of the variable in a 3rd task. I see the text in the pipeline debug screen which is not nothing

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions