June 28, 2019 By Andrew Trice 2 min read

The IBM Cloud developer experience team is pleased to announce the latest version of the IBM Cloud Developer Tools CLI.

In addition to the usual stability/quality improvements, we are excited to announce some new IBM Cloud Developer Tools CLI productivity features that let you manage your IBM Cloud DevOps toolchains and pipelines directly from the CLI.

DevOps commands

The new DevOps commands in the ibmcloud dev CLI make it even easier to manage and interact with your IBM Cloud DevOps toolchains and pipelines.

Toolchains are collections of services that work together as part of your DevOps processes. CLI commands for toolchains include the following:

  • ibmcloud dev toolchains: Fetch all of your toolchains for the current region.
  • ibmcloud dev toolchain-get: Fetch details for a specific DevOps toolchain.
  • ibmcloud dev toolchain-open: Open the system web browser to view the toolchain on IBM Cloud.
  • <a href="https://cloud.ibm.com/docs/cli/idt?topic=cloud-cli-idt-cli#toolchain-delete" target="_blank">ibmcloud dev toolchain-delete</a>: Delete a toolchain instance.

A toolchain can contain one or more delivery pipelines. A delivery pipeline is the scripted path that is executed for a DevOps process. CLI commands for pipelines include the following: 

Scriptability

The new DevOps commands were also designed with scriptability in mind. When fetching details for toolchains or pipelines, you can use the --json flag to return the toolchain or pipeline definition in JSON format instead of the readability-optimized format. This lets you take the output of the command and pipe it directly into a JSON parser for use in scripting and automation workflows.

For example, let’s look at a relatively simple `bash` script that makes use of the --json flag and jq for JSON processing. The script fetches all toolchains, extracts the name from the first one, fetches details for that toolchain, extracts the pipeline id, and then runs/invokes the DevOps pipeline:

# Fetch toolchains as JSON
TOOLCHAINS="$(ibmcloud dev toolchains --json)"


# Parse the first toolchain name
TOOLCHAIN_NAME="$(echo $TOOLCHAINS | jq .items[0].name -r)"


# Extract the pipeline id
PIPELINE_SERVICE="$(echo $TOOLCHAIN | jq '.items[].services[] | select(.service_id == "pipeline")' -r)"
PIPELINE_ID="$(echo $PIPELINE_SERVICE | jq .instance_id -r)"


#invoke the pipeline
ibmcloud dev pipeline-invoke $PIPELINE_ID

Important notes

The DevOps CLI functionality can only be used to target toolchains that exist within a resource group. Older Cloud Foundry-based toolchains may not be compatible with the DevOps CLI commands.

Another thing to keep in mind when working with the DevOps commands is that DevOps toolchains and pipelines are region-specific. The DevOps commands will use the region where you are currently logged into with the ibmcloud cli. If you’re not sure which region you’re targeting, just use the ibmcloud target command to find out.

What else is new?

Other notable features in this release include:

  • General formatting and usability improvements
  • Removal of the deprecated OpenAPI support in ibmcloud dev create
  • Golang projects are now supported in ibmcloud dev enable
  • Added -f (force) flag to ibmcloud dev delete—it’s now even easier to script

For assistance, please submit questions to the author of this article. You can reach the development team in the #developer-tools channel of this Slack. You can request access to this Slack channel here.

More from Cloud

Enhance your data security posture with a no-code approach to application-level encryption

4 min read - Data is the lifeblood of every organization. As your organization’s data footprint expands across the clouds and between your own business lines to drive value, it is essential to secure data at all stages of the cloud adoption and throughout the data lifecycle. While there are different mechanisms available to encrypt data throughout its lifecycle (in transit, at rest and in use), application-level encryption (ALE) provides an additional layer of protection by encrypting data at its source. ALE can enhance…

Attention new clients: exciting financial incentives for VMware Cloud Foundation on IBM Cloud

4 min read - New client specials: Get up to 50% off when you commit to a 1- or 3-year term contract on new VCF-as-a-Service offerings, plus an additional value of up to USD 200K in credits through 30 June 2025 when you migrate your VMware workloads to IBM Cloud®.1 Low starting prices: On-demand VCF-as-a-Service deployments begin under USD 200 per month.2 The IBM Cloud benefit: See the potential for a 201%3 return on investment (ROI) over 3 years with reduced downtime, cost and…

The history of the central processing unit (CPU)

10 min read - The central processing unit (CPU) is the computer’s brain. It handles the assignment and processing of tasks, in addition to functions that make a computer run. There’s no way to overstate the importance of the CPU to computing. Virtually all computer systems contain, at the least, some type of basic CPU. Regardless of whether they’re used in personal computers (PCs), laptops, tablets, smartphones or even in supercomputers whose output is so strong it must be measured in floating-point operations per…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters