Adding a Wait Stage

Learn how to add a Wait stage in the build pipeline to test the pipeline by pausing the build run for a specific duration.

Before you add a stage, you must have a build pipeline.

The Wait stage can't be added as the first stage to a build pipeline. The pipeline must have at least one Managed Build stage first.

This stage adds a specified duration of delay in the build pipeline. Duration is given in seconds, for example, 300 seconds. During this duration, the build process is paused.

For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.

Using the Console

  1. Open the navigation menu and click Developer Services. Under DevOps, click Projects.
  2. Select a project and a build pipeline.
  3. To add a stage to the pipeline, click the + icon.
  4. Select Add stage to add the stage sequentially or select Add parallel stage.
  5. For the stage type, select Wait, and then click Next.
  6. Enter a name and optional description for the stage.
  7. Enter the wait time in seconds.
  8. To add the stage to the pipeline, click Add.

Using the CLI

To create a build pipeline, run the create command:

oci devops build-pipeline create --project-id

To add a Wait stage for the pipeline, run the create-wait-stage command:

oci devops build-pipeline-stage create-wait-stage

Required parameters:

  • --build-pipeline-id
  • --wait-criteria
  • --stage-predecessor-collection

To get all the commands for build-pipeline and build-pipeline-stage:

oci devops build-pipeline -h
oci devops build-pipeline-stage -h

To get help for the create-wait-stage command:

oci devops build-pipeline-stage create-wait-stage -h

Using the API

To create a build pipeline, use the CreateBuildPipeline operation.

To add a Wait stage for the pipeline, use the CreateBuildPipelineStage operation. For the buildPipelineStageType attribute, specify the value as WAIT.