Class JobStep.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<JobStep>
    Enclosing interface:
    JobStep

    @Stability(Experimental)
    public static final class JobStep.Builder
    extends Object
    implements software.amazon.jsii.Builder<JobStep>
    A builder for JobStep
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • run

        @Stability(Experimental)
        public JobStep.Builder run​(String run)
        Sets the value of Step.getRun()
        Parameters:
        run - Runs command-line programs using the operating system's shell. If you do not provide a name, the step name will default to the text specified in the run command.
        Returns:
        this
      • uses

        @Stability(Experimental)
        public JobStep.Builder uses​(String uses)
        Sets the value of Step.getUses()
        Parameters:
        uses - Selects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a published Docker container image.
        Returns:
        this
      • with

        @Stability(Experimental)
        public JobStep.Builder with​(Map<String,​? extends Object> with)
        Sets the value of Step.getWith()
        Parameters:
        with - A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed with INPUT_ and converted to upper case.
        Returns:
        this
      • env

        @Stability(Experimental)
        public JobStep.Builder env​(Map<String,​String> env)
        Sets the value of JobStep.getEnv()
        Parameters:
        env - Sets environment variables for steps to use in the runner environment. You can also set environment variables for the entire workflow or a job.
        Returns:
        this
      • id

        @Stability(Experimental)
        public JobStep.Builder id​(String id)
        Sets the value of JobStep.getId()
        Parameters:
        id - A unique identifier for the step. You can use the id to reference the step in contexts.
        Returns:
        this
      • ifValue

        @Stability(Experimental)
        public JobStep.Builder ifValue​(String ifValue)
        Sets the value of JobStep.getIfValue()
        Parameters:
        ifValue - You can use the if conditional to prevent a job from running unless a condition is met. You can use any supported context and expression to create a conditional.
        Returns:
        this
      • name

        @Stability(Experimental)
        public JobStep.Builder name​(String name)
        Sets the value of JobStep.getName()
        Parameters:
        name - A name for your step to display on GitHub.
        Returns:
        this
      • workingDirectory

        @Stability(Experimental)
        public JobStep.Builder workingDirectory​(String workingDirectory)
        Parameters:
        workingDirectory - Specifies a working directory for a step. Overrides a job's working directory.
        Returns:
        this
      • continueOnError

        @Stability(Experimental)
        public JobStep.Builder continueOnError​(Boolean continueOnError)
        Parameters:
        continueOnError - Prevents a job from failing when a step fails. Set to true to allow a job to pass when this step fails.
        Returns:
        this
      • build

        @Stability(Experimental)
        public JobStep build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<JobStep>
        Returns:
        a new instance of JobStep
        Throws:
        NullPointerException - if any required attribute was not provided