public class NodePoolUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Long |
covertHoldUtilStringToEpochMs(long initialTimeEpochMs,
String holdUntilValue)
Converts the hold until string value to an absolute epoch time in milliseconds.
|
static String |
getFormattedDateTime(Long epochMs,
ZoneOffset zone)
Converts the milliseconds since epoch to a
|
static org.jenkinsci.plugins.workflow.job.WorkflowRun |
getRunForQueueTask(hudson.model.Queue.Task task)
Get the Run (build) associated with a Queue Item
|
public static Long covertHoldUtilStringToEpochMs(long initialTimeEpochMs, String holdUntilValue) throws HoldUntilValueException
initialTimeEpochMs
- the time instant starting pointholdUntilValue
- the string value for the hold until relative to the initial timeHoldUntilValueException
- if the hold until value is malformed or incorrect.public static String getFormattedDateTime(Long epochMs, ZoneOffset zone)
epochMs
- the milliseconds since epochzone
- the zone offset - typically UTCpublic static org.jenkinsci.plugins.workflow.job.WorkflowRun getRunForQueueTask(hudson.model.Queue.Task task)
task
- The task to find a run for.Copyright © 2016–2018. All rights reserved.