Pipeline

conduit

Wrap all Pipeline steps with default settings. Enable timestamps and send notifications using sendNotifications before Pipeline exit.

Usage

conduit {
  // code
}

Example

conduit {
  node {
    stage("Checkout") {
      checkout scm
    }
    stage("Test") {
      sh 'make tests'
    }
  }
}

getCurrentBuildStatus

Get current build status.

Returns Groovy String SUCCESS or FAILURE.

Usages

def status = getCurrentBuildStatus()

optional

Execute optional steps.

Executes steps that can fail without affecting the status of the Pipeline.

Usage

optional {
  // code
}

Example

optional {
  sh "bash -c 'false'"
}