0
votes

I am trying to run a build without having Maven already directly installed on an ADO self-hosted agent. I would like to be able to have a task do the Maven installation for me AND satisfy the demand requirement that some builds have. (The builds have a Maven demand but the agent doesnt have Maven installed until the task runs.)

In the Maven installer task I have a satisfies section that looks like:

“satisfies”: [
“maven”
],

There are tasks in Microsoft repo that have the same tag as above, but for different softwares. Please see these repositories:

(This repo satisfies DotNetCore) https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/DotNetCoreInstallerV1/task.json

(This repo satisfies Java and JDK) https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/JavaToolInstallerV0/task.json

The Microsoft tasks with a satisfies section will satisfy demands, while mine does not.

I’m assuming that that the Satisfy section will Satisfy Demands that certain pipelines will have. Is this assumption correct? Or does anyone know what is the satisfies section is for??

1

1 Answers

0
votes

I think the demands section, not the satisfies section, defines the demands of the pipeline.

Here is the sample code from tasks.schema.json of demands and the description said that

this section define a list of demands that a build agent requires to run this build task.

"demands": {
  "type": "array",
  "description": "Allows you to define a list of demands that a build agent requires to run this build task.",
  "items": {
    "type": "string"
  }
},