The Node.js client library to interact with the IBM Cloud Continuous Delivery Toolchain and Tekton Pipeline APIs.
The IBM Cloud Continuous Delivery Node.js SDK allows developers to programmatically interact with the following IBM Cloud services:
| Service Name | Import Path |
|---|---|
| Toolchain API | @ibm-cloud/continuous-delivery/cd-toolchain/v2 |
| Tekton Pipeline API | @ibm-cloud/continuous-delivery/cd-tektonpipeline/v2 |
Table 1. IBM Cloud services
ibm-continuous-delivery package has been deprecated!
The IBM Continuous Delivery Node SDK is now available as @ibm-cloud/continuous-delivery.
To migrate to the new package, you can use the commands listed below:
npm uninstall ibm-continuous-delivery
npm install @ibm-cloud/continuous-deliveryYou will also need to modify any references to the old package ibm-continuous-delivery within import/require statements so they reflect the new package @ibm-cloud/continuous-delivery. Here is an example:
// 'require' statements that reflect the old package name:
const CdToolchainV2 = require("ibm-continuous-delivery/cd-toolchain/v2");
const CdTektonPipelineV2 = require("ibm-continuous-delivery/cd-tekton-pipeline/v2");
// Modify this to reflect the new package name:
const CdToolchainV2 = require("@ibm-cloud/continuous-delivery/cd-toolchain/v2");
const CdTektonPipelineV2 = require("@ibm-cloud/continuous-delivery/cd-tekton-pipeline/v2");- You need an IBM Cloud account.
- Node.js >=22: This SDK is tested with Node.js versions 22 and up. It may work on previous versions but this is not officially supported.
npm install @ibm-cloud/continuous-deliveryFor general SDK usage information, see IBM Cloud SDK Common README.
Integration tests run against live IBM Cloud services and require proper configuration. To run integration tests locally or in CI/CD:
Configure the following secrets in your GitHub repository (Settings → Secrets and variables → Actions):
CLOUD_API_KEY: IBM Cloud API key with permissions to create and manage Continuous Delivery resources
Configure the following variables in your GitHub repository (Settings → Secrets and variables → Actions):
For CD Toolchain Service:
CD_TOOLCHAIN_URL: Service endpoint URL (e.g.,https://api.us-south.devops.cloud.ibm.com/toolchain/v2)CD_TOOLCHAIN_AUTH_TYPE: Authentication type (typicallyiam)CD_TOOLCHAIN_EVENT_NOTIFICATIONS_SERVICE_CRN: Event Notifications service CRN for toolchain eventsCD_TOOLCHAIN_RESOURCE_GROUP_ID: IBM Cloud resource group ID where resources will be created
For CD Tekton Pipeline Service:
CD_TEKTON_PIPELINE_URL: Service endpoint URL (e.g.,https://api.us-south.devops.cloud.ibm.com/pipeline/v2)CD_TEKTON_PIPELINE_AUTH_TYPE: Authentication type (typicallyiam)CD_TEKTON_PIPELINE_RESOURCE_GROUP_ID: IBM Cloud resource group ID where resources will be created
For local integration testing, create the following environment files in the project root:
cd_toolchain_v2.env:
CD_TOOLCHAIN_APIKEY=<your-ibm-cloud-api-key>
CD_TOOLCHAIN_URL=https://api.us-south.devops.cloud.ibm.com/toolchain/v2
CD_TOOLCHAIN_AUTH_TYPE=iam
CD_TOOLCHAIN_EVENT_NOTIFICATIONS_SERVICE_CRN=<your-event-notifications-crn>
CD_TOOLCHAIN_RESOURCE_GROUP_ID=<your-resource-group-id>cd_tekton_pipeline_v2.env:
CD_TEKTON_PIPELINE_URL=https://api.us-south.devops.cloud.ibm.com/pipeline/v2
CD_TEKTON_PIPELINE_AUTH_TYPE=iam
CD_TEKTON_PIPELINE_APIKEY=<your-ibm-cloud-api-key>
CD_TEKTON_PIPELINE_RESOURCE_GROUP_ID=<your-resource-group-id>
CD_TOOLCHAIN_URL=https://api.us-south.devops.cloud.ibm.com/toolchain/v2
CD_TOOLCHAIN_AUTH_TYPE=iam
CD_TOOLCHAIN_APIKEY=<your-ibm-cloud-api-key>
CD_TOOLCHAIN_RESOURCE_GROUP_ID=<your-resource-group-id>Note: These .env files are gitignored and should never be committed to version control.
# Run unit tests only
npm run test-unit
# Run integration tests (requires .env files)
npm run test-integration
# Run all tests
npm testIntegration tests run automatically on pull requests. To skip integration tests in a manual workflow run:
- Go to Actions → pull-request workflow
- Click "Run workflow"
- Check "Skip integration tests"
- Click "Run workflow"
If you encounter an issue with the SDK, you are welcome to submit a bug report. Before that, please search for similar issues. It's possible someone has already encountered this issue.
Find more open source projects on the IBM Github Page
See CONTRIBUTING.
This project is released under the Apache 2.0 license. The license's full text can be found in LICENSE.