hudson.plugins.label_verifier.verifiers
Class ShellScriptVerifier
java.lang.Object
hudson.model.AbstractDescribableImpl<LabelVerifier>
hudson.plugins.label_verifier.LabelVerifier
hudson.plugins.label_verifier.verifiers.ShellScriptVerifier
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<LabelVerifier>
public class ShellScriptVerifier
- extends LabelVerifier
Verifies the label by running a shell script.
- Author:
- Kohsuke Kawaguchi
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
|
Field Summary |
java.lang.String |
script
|
|
Method Summary |
void |
verify(hudson.model.labels.LabelAtom label,
hudson.model.Computer c,
hudson.remoting.Channel channel,
hudson.FilePath root,
hudson.model.TaskListener listener)
Called before a Computer becomes online to verify if the label assignment is correct. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
script
public final java.lang.String script
ShellScriptVerifier
@DataBoundConstructor
public ShellScriptVerifier(java.lang.String script)
verify
public void verify(hudson.model.labels.LabelAtom label,
hudson.model.Computer c,
hudson.remoting.Channel channel,
hudson.FilePath root,
hudson.model.TaskListener listener)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
LabelVerifier
- Called before a
Computer becomes online to verify if the label assignment is correct.
- Specified by:
verify in class LabelVerifier
- Parameters:
label - Label whose validity you'll check.channel - This is the channel object to talk to the slave.
(This is the same object returned by Computer.getChannel() once
it's connected.root - The directory where this slave stores files.
The same as Node.getRootPath(), except that method returns
null until the slave is connected. So this parameter is passed explicitly instead.listener - This is connected to the launch log of the computer.
Since this method is called synchronously from the thread
that launches a computer, if this method performs a time-consuming
operation, this listener should be notified of the progress.
This is also a good listener for reporting problems.
- Throws:
java.io.IOException - Exceptions will be recorded to the listener, and
the computer will not become online.
java.lang.InterruptedException - Exceptions will be recorded to the listener, and
the computer will not become online.
Copyright © 2010. All Rights Reserved.