GitHub Actions for CloudBees Continuous Delivery / Release Orchestration (CD/RO) are now available in the GitHub Marketplace. CloudBees CD/RO has always embraced developer autonomy in tool choice while acting as an uber orchestrator to centralized visibility and management. Thus, we have created actions in the marketplace to make using GHA within CD/RO as seamless as possible. Users will require a CD/RO instance and a GitHub account to use these.
At the time of this blog, there are six published actions to communicate with CD/RO, spanning procedures, pipelines, releases, and application processes. This blog will detail each of these actions and conclude with a demo showcasing these in action.
Run CD/RO Procedure
Our first action is the Run CD/RO Procedure, where you can run a specified procedure and pass in parameters.
steps:
- name: Run Procedure Action
uses: cloudbees-github-actions/run-procedure@v1
env:
CDRO_URL: ${{ secrets.CDRO_URL }}
CDRO_TOKEN: ${{ secrets.CDRO_TOKEN }}
with:
projectName: My project
procedureName: My procedure
actualParameter: |
param1: param1 value
param2: 1.0Procedures are a way of creating reusable operations that can be run independently or as part of a pipeline. Using this action, you can now easily run these operations as part of your GitHub Actions Workflow. As you can see in the example above, all you need to do is specify which procedure you want to run and which project it lives in, and then optionally pass in parameters if required by that procedure.
Run CD/RO Process
The next action is the Run CD/RO Process, which allows you to run a target process on an application.
steps:
- name: Run Process
uses: cloudbees-github-actions/run-process@v1
env:
CDRO_URL: ${{ secrets.CDRO_URL }}
CDRO_TOKEN: ${{ secrets.CDRO_TOKEN }}
with:
projectName: GHA Project
applicationName: GHA Application
processName: GHA Process
environmentName: QA
actualParameter: |
Input1: xyz
Input2: abc
Input3: "line1\nline2"A process defines how to do a particular operation for a given application. For example, you might have processes defined for how to install and uninstall an application. This allows you to define the process once and then use it against any target environment for your application. And using this GitHub Action, you can now kick off these processes as part of your workflow.
A use case for this is kicking off your application deployment after completing your CI tasks. This lets you separate concerns, doing the basic CI operations in your workflow and calling CD/RO to manage the CD operations.
Start CD/RO Release
Next up is the Start CD/RO Release action. With this action, you specify which release you want to target, which will kick off a new release run.
steps:
- name: Start Release Action
uses: cloudbees-github-actions/start-release@v1
env:
CDRO_URL: ${{ secrets.CDRO_URL }}
CDRO_TOKEN: ${{ secrets.CDRO_TOKEN }}
with:
projectName: My project
releaseName: My release
pipelineParameter: |
param1: param1 value
param2: 1.0Run CD/RO Pipeline
Similarly, for those non-release pipelines, we have the Run CD/RO Pipeline action.
steps:
- name: Run Pipeline Action
uses: cloudbees-github-actions/run-pipeline@v1
env:
CDRO_URL: ${{ secrets.CDRO_URL }}
CDRO_TOKEN: ${{ secrets.CDRO_TOKEN }}
with:
projectName: My project
pipelineName: My pipeline
actualParameter: |
param1: param1 value
param2: 1.0Create a CD/RO Release from a Template
Often, rather than just kicking off a release, you’ll want first to instantiate a new release and then run it. We have the Create a CD/RO Release from a Template action to do just that.
steps:
- name: Create release
env:
CDRO_URL: ${{ secrets.CDRO_URL }}
CDRO_TOKEN: ${{ secrets.CDRO_TOKEN }}
uses: cloudbees-github-actions/create-release-from-template@v1
with:
templateProjectName: Electric Cloud
templateCatalogName: Releases
templateName: Multi-stage CD Release
actualParameter: |
releaseProjectName: GHA Test
releaseName: GHA Release from template
releaseDescription: desc
releaseStartDate: 2023-07-31
releaseEndDate: 2023-08-02You can use this along with the Start CD/RO Release action to first create the release and then start it.
Execute CD/RO DSL
Sometimes, you must do more complex operations and want full access to the DSL. We have the Execute CD/RO DSL action to allow you to run any DSL against your CD/RO server.
steps:
- name: RunEvalDSL Action
uses: cloudbees-github-actions/eval-dsl@v1
env:
CDRO_URL: ${{ secrets.CDRO_URL }}
CDRO_TOKEN: ${{ secrets.CDRO_TOKEN }}
with:
dsl-file: ./example-dsl.groovy
dsl-args: |
projectName: My project
projectDescription: My project description
procedureName: My procedure
dsl-actual-parameter: |
procedureInput1: 123
procedureInput2: abcInteresting note: all previous actions are built on top of this Execute DSL action. You can easily do the same if you want to encapsulate your own standard operations into actions. You can look at the actions.yaml from one of our other actions to see how simple it is.
Summary
In conclusion, CloudBees CD/RO has officially launched six new actions with GitHub Marketplace to help efficiently manage your release and deployment processes.
We have created a demo environment with a step-by-step guide and a corresponding video for those seeking a more hands-on approach. By following our guide, you'll be well on your way to streamlining your software development lifecycle. For additional information, visit our documentation page. Happy coding!
Stay tuned for our free trial experience of CloudBees CD/RO to test out these Actions!