IBM Cloud Docs
Working with pipelines

Working with pipelines

To automate your builds and deployments to IBM Cloud®, use IBM Cloud® Continuous Delivery pipelines.

With pipelines, you can choose from several build types. You provide the build script, and Continuous Delivery runs it; you don't need to set up build systems. Then, with one click, you can automatically deploy your app to one or many IBM Cloud spaces or Docker containers on the IBM Cloud® Kubernetes Service.

Build jobs compile and package your app source code from Git repositories. The build jobs produce deployable artifacts, such as WAR files or Docker containers for the IBM Cloud Kubernetes Service. In addition, you can run unit tests within your build automatically. You can set up your build jobs so that each time a commit is pushed, a build is triggered.

A deployment job takes output from a build job and deploys it to the IBM Cloud Kubernetes Service.

You can deploy to one or many regions and services. For example, you can set up your Delivery Pipeline to use one or more services, test in one region, and deploy to production in multiple regions.

Creating a pipeline

You can use any of the following methods to create a pipeline:

From your Delivery Pipeline, change your configuration; check the status of builds, the deployed app, and recent deployments; see the most recent logs and deployment details; or delete your pipeline.

Viewing a pipeline by using the CLI

To get the details that are required to invoke a pipeline, run the **ibmcloud dev toolchains** command to view the name of the toolchain. If you already know the name of the toolchain, run the **ibmcloud dev toolchain-get [toolchain-name]** to view the toolchain details.

  • To get the details of a pipeline and its stages, identify the pipeline and its ID to run the following command:

    ibmcloud dev pipeline-get [pipelineID]
  • Using the pipeline ID from the previous command, you can now run the pipeline:

    ibmcloud dev pipeline-run [pipelineID]

    This command invokes an execution of the stage and its jobs. A successful execution results in the job execution for each job in the selected stage.

Viewing pipeline logs by using the CLI

You can view detailed output of each stage during a pipeline's execution.

  • To view the logs from a pipeline's execution, run the following command:

    ibmcloud dev pipeline-log [pipelineID]
  • To filter the logs by stage, apply the previous command and add the stage ID:

    ibmcloud dev pipeline-log [pipelineID] --stage-id [stageID]