Package io.jenkins.plugins.har.cli
Class HcStep.Execution
java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecution
org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<String>
io.jenkins.plugins.har.cli.HcStep.Execution
- All Implemented Interfaces:
Serializable
- Enclosing class:
HcStep
public static class HcStep.Execution
extends org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<String>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractAccountIdFromToken(String token) PAT format:pat.<AccountID>.<random>.<random>Returns the AccountID segment, or an empty string if the token is malformed.static StringgetHcCliPath(EnvVars env, boolean isWindows) Resolves the full path to the hc binary.static voidperformLogout(Launcher launcher, FilePath workspace, EnvVars env, String hcBinaryPath, boolean isWindows, TaskListener listener) Runshc auth logoutto clean up credentials from disk at build end.protected Stringrun()Methods inherited from class org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution
blocksRestart, getStatus, onResume, start, stopMethods inherited from class org.jenkinsci.plugins.workflow.steps.StepExecution
acceptAll, acceptAll, applyAll, applyAll, getContext, getStatusBounded
-
Constructor Details
-
Execution
protected Execution(String[] args, @NonNull org.jenkinsci.plugins.workflow.steps.StepContext context)
-
-
Method Details
-
run
-
performLogout
public static void performLogout(Launcher launcher, FilePath workspace, EnvVars env, String hcBinaryPath, boolean isWindows, TaskListener listener) throws IOException, InterruptedException Runshc auth logoutto clean up credentials from disk at build end. Called byHarnessCliWrapper's Disposer (Freestyle) and byHarnessRunListener(Pipeline).- Throws:
IOExceptionInterruptedException
-
extractAccountIdFromToken
PAT format:pat.<AccountID>.<random>.<random>Returns the AccountID segment, or an empty string if the token is malformed. -
getHcCliPath
Resolves the full path to the hc binary. Uses "HARNESS_CLI_PATH" when set (via the tool installer), or falls back to just the binary name so the OS PATH is searched.
-