0

I am using the official Microsoft ServiceNow plugin in a gate to create tickets via Azure Pipelines.

Once the gate is finished processing, there is an output that I'd like to consume in an agent job. The problem is that this output is only available in agentless jobs (which is not very useful for my use case).

How can I make it so that I can pass that output value from an agentless job to an agent job?

mmuso
  • 11
  • 3

1 Answers1

0

It doesn't look like you can pass an output value out of an agentless job.

Passing variables between jobs requires running a script. See an example in the docs here: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-a-multi-job-output-variable

Agentless jobs do not support script pwsh or bash tasks, meaning you can't call a script and therefore can't set the output variable.

The easiest solution would be to use an agent.

See here for what tasks are supported by agentless jobs: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#agentless-tasks

sonofhamer
  • 121
  • 5