Skip to content

Commit

Permalink
Merge pull request #83 from abayer/jenkins-40790
Browse files Browse the repository at this point in the history
[JENKINS-40790] Add metadata for whether agents support tools
  • Loading branch information
abayer committed Jan 10, 2017
2 parents cf217be + 52f5bbb commit f1a0249
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Expand Up @@ -41,6 +41,15 @@
*/
public abstract class DeclarativeAgentDescriptor<A extends DeclarativeAgent<A>> extends WithScriptDescriptor<A> {

/**
* Whether this agent type supports tools within it.
*
* @return True if the agent type does support tools, false otherwise (and by default).
*/
public boolean supportsTools() {
return false;
}

/**
* Get all {@link DeclarativeAgentDescriptor}s.
*
Expand Down
Expand Up @@ -39,5 +39,9 @@ public Any() {

@Extension(ordinal = -900) @Symbol("any")
public static class DescriptorImpl extends DeclarativeAgentDescriptor<Any> {
@Override
public boolean supportsTools() {
return true;
}
}
}
Expand Up @@ -47,5 +47,9 @@ public Label(String label) {

@Extension(ordinal = -800) @Symbol("label")
public static class DescriptorImpl extends DeclarativeAgentDescriptor<Label> {
@Override
public boolean supportsTools() {
return true;
}
}
}

0 comments on commit f1a0249

Please sign in to comment.