Google Cloud DevOps CICD Pipelines
This page provides a basic example of how to create pipelines with DecisionRules and Google Cloud Platform. For more advanced or customized pipelines tailored to specific use cases, please refer to DecisionRules Consulting for expert guidance and support.
Introduction
This tutorial will guide you through setting up two CI/CD pipelines using Google Cloud Build to automate the management of business rules in DecisionRules. The first pipeline will handle moving business rules from one DecisionRules space to another, even across different environments (e.g., from development to production). The second pipeline will focus on Point-in-Time Recovery, allowing you to revert to a previous state of your business rules when necessary.
Prerequisites
For the following steps you will need access to
Google Cloud account
Google Cloud Build – Used to orchestrate the migration of the rules
Google Cloud Storage – Used to store backups of your rules
Setting up the Migration pipeline
This pipeline will be able to export rules from one selected space into another destination space.
GCP Cloud Storage Setup
First we need to set up the storage that will be used to back up the rules. In your Google Cloud account navigate to Cloud Storage and execute the following steps:
Navigate to Cloud Storage → Buckets
Click + Create
Choose a name for the bucket
Select a location type
Set the default storage class – Coldline or Archive are suitable for data accessed infrequently (note: Archive has a 365-day minimum storage duration, so prefer Nearline/Coldline if you create backups frequently)
Select access control (default: Uniform)
Select data protection as necessary
Click Create
Now you should have everything you need in Cloud Storage.
GCP Cloud Build setup
Now that we have the backup storage prepared we can go and configure the migration pipeline itself. Execute the following steps:
Navigate to Cloud Build (using the search bar)
Navigate to Triggers → + Create trigger
Fill in name, description, etc.
Event – Select Manual invocation
Configuration – select Inline
Open editor – Paste the following code:
Click Done
Click + Add variable for each of the following variables:
_BUCKET_NAME
Fill in the name of your storage bucket that will be used to store backups
_ENV_URL_SRC and _ENV_URL_DEST
URL for your DR API (
https://api.decisionrules.ioas an example for public cloud)
_SRC_ENV
Management API key of the Source space
_DEST_ENV
Management API key of the Destination space
Select the Service account
Click Save
Clicking Run will execute the build, whose progress can be seen through the popup at the bottom of the screen or in History
After the build is successfully finished, the destination space should now contain a copy of the rules in the source space, and a backup file for both should now be available in the selected bucket.
Setting up a rollback pipeline
This pipeline will be able to restore your space to a previous state based on the backups created by the migration pipeline, stored in Cloud Storage.
GCP Cloud Storage setup
The storage bucket was already created for the previous pipeline. The suggestion is to create a folder in the bucket (e.g. Rollback-backup) for storing the backup of the space that is being rolled back.
GCP Cloud Build setup
The setup closely resembles the setup of the previous pipeline.
Navigate to Cloud Build (using the search bar)
Navigate to Triggers → + Create trigger
Fill in name, description, etc.
Event – Select Manual invocation
Configuration – select Inline
Open editor – Paste the following code:
Click Done
Click + Add variable for each of the following variables:
_BUCKET_NAME
Fill in the name of your storage bucket that holds the backups to roll back from
_ENV_URL
URL for your DR API (
https://api.decisionrules.ioas an example for public cloud)
_DEST_ENV
Management API key of the Destination space
_BACKUP_LOCATION
Address of the folder used to store the pre-rollback backup of the space that is being rolled back (e.g.
env-back-ups/Rollback-backup)
_BACKUP_FILE_NAME
Name of the file that is being rolled back to (should be in the
_BUCKET_NAMEbucket), e.g.destinationBackup-20250506T1220_a1b2c3d.json
Select the Service account
Click Save
Executing the trigger
In this trigger we want to choose, for each execution, the specific backup file that we are rolling back to. This can be achieved two ways.
Running the trigger manually (the "Run" button in Cloud Build → Triggers)
First, go to edit the trigger.
Change the _BACKUP_FILE_NAME variable to contain the required backup file name.
Save the trigger.
Click Run.
Running the trigger using the Google Cloud console
Top right, click Activate Cloud Shell.
Wait for the terminal to open.
Run the following command (you have to provide the name of your pipeline and the name of your backup file):
After running the command you should be able to monitor the process in Cloud Build / History
Last updated
Was this helpful?

