Class LockStep
java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
org.jenkins.plugins.lockableresources.LockStep
- All Implemented Interfaces:
ExtensionPoint,Describable<org.jenkinsci.plugins.workflow.steps.Step>,Serializable
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionOptional list of resource names to pick from, in list order.booleanlongSeconds the resources stay locked after the build is aborted inside the lock block.longSeconds the resources stay locked after the lock block ends normally or fails, e.g.intintThe reason why this resource is being locked, displayed in the UI while locked.Share id of this lock block.booleanlongTimeout in the specifiedtimeoutUnitfor waiting to acquire the resource.Time unit fortimeoutForAllocateResource.name of environment variable to store locked resources in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGroup()booleanvoidsetCandidates(List<String> candidates) voidsetExtra(List<LockStepResource> extra) voidvoidsetInversePrecedence(boolean inversePrecedence) voidvoidsetOnCancelDelay(long onCancelDelay) voidsetOnReleaseDelay(long onReleaseDelay) voidsetPriority(int priority) voidsetQuantity(int quantity) voidvoidsetResourceSelectStrategy(String resourceSelectStrategy) voidsetServerId(String serverId) voidsetShareId(String shareId) voidsetSkipIfLocked(boolean skipIfLocked) voidsetTimeoutForAllocateResource(long timeoutForAllocateResource) voidsetTimeoutUnit(String timeoutUnit) voidsetVariable(String variable) org.jenkinsci.plugins.workflow.steps.StepExecutionstart(org.jenkinsci.plugins.workflow.steps.StepContext context) toString()voidvalidate(boolean allowEmptyOrNullValues) Label and resource are mutual exclusive.Methods inherited from class org.jenkinsci.plugins.workflow.steps.Step
getDescriptor
-
Field Details
-
resource
-
label
-
reason
The reason why this resource is being locked, displayed in the UI while locked. -
quantity
public int quantity -
variable
name of environment variable to store locked resources in -
inversePrecedence
public boolean inversePrecedence -
resourceSelectStrategy
-
skipIfLocked
public boolean skipIfLocked -
serverId
-
extra
-
priority
public int priority -
timeoutForAllocateResource
public long timeoutForAllocateResourceTimeout in the specifiedtimeoutUnitfor waiting to acquire the resource. 0 means no timeout (wait indefinitely). When the timeout expires, the step fails with an exception instead of waiting forever. -
timeoutUnit
Time unit fortimeoutForAllocateResource. Defaults to MINUTES. -
candidates
-
onReleaseDelay
public long onReleaseDelaySeconds the resources stay locked after the lock block ends normally or fails, e.g. for a license cooldown. The pipeline continues right away. 0 (default) releases them immediately. -
onCancelDelay
public long onCancelDelaySeconds the resources stay locked after the build is aborted inside the lock block. 0 (default) releases them immediately.
-
-
Constructor Details
-
LockStep
-
-
Method Details
-
getGroup
- Since:
- TODO
-
setGroup
- Since:
- TODO
-
isGroupOnly
public boolean isGroupOnly()- Since:
- TODO
-
setInversePrecedence
@DataBoundSetter public void setInversePrecedence(boolean inversePrecedence) -
setResourceSelectStrategy
-
setSkipIfLocked
@DataBoundSetter public void setSkipIfLocked(boolean skipIfLocked) -
setServerId
-
setLabel
-
setReason
-
setVariable
-
setQuantity
@DataBoundSetter public void setQuantity(int quantity) -
setPriority
@DataBoundSetter public void setPriority(int priority) -
setExtra
-
setTimeoutForAllocateResource
@DataBoundSetter public void setTimeoutForAllocateResource(long timeoutForAllocateResource) -
setTimeoutUnit
-
setCandidates
-
setOnReleaseDelay
@DataBoundSetter public void setOnReleaseDelay(long onReleaseDelay) -
setOnCancelDelay
@DataBoundSetter public void setOnCancelDelay(long onCancelDelay) -
toString
-
validate
public void validate(boolean allowEmptyOrNullValues) Label and resource are mutual exclusive. -
getResources
-
start
public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context) - Specified by:
startin classorg.jenkinsci.plugins.workflow.steps.Step
-