Class HcStep

java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
io.jenkins.plugins.har.cli.HcStep
All Implemented Interfaces:
ExtensionPoint, Describable<org.jenkinsci.plugins.workflow.steps.Step>

public class HcStep extends org.jenkinsci.plugins.workflow.steps.Step
Pipeline step hc(...) that runs the Harness CLI binary.

Before the first hc invocation on each agent in a build, the step automatically runs hc auth login using the credentials configured under Manage Jenkins → Configure System → Harness CLI Configuration. Later hc steps on the same agent skip login (tracked via HarnessCliLoginTracker). A later stage on a different agent logs in again, because auth lives on that agent's disk.

Example Declarative Pipeline:


 pipeline {
     agent any
     tools { harnessCli 'hc-default' }
     stages {
         stage('Deploy') {
             steps {
                 hc 'artifact push generic my-repo build/output.jar'
             }
         }
     }
 }
 
  • Constructor Details

    • HcStep

      @DataBoundConstructor public HcStep(Object args)
  • Method Details

    • getArgs

      public String[] getArgs()
    • start

      public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context)
      Specified by:
      start in class org.jenkinsci.plugins.workflow.steps.Step