Implementation of CICD for Catalyst webclient and functions from Bitbucket

Implementation of CICD for Catalyst webclient and functions from Bitbucket

We can migrate our Catalyst project from the Bitbucket Repository to the Catalyst deployment environment using the CI/CD pipeline.

 

 Pre-requisites:

  1. Before setting up make sure you have the following data for your catalyst project

      1. catalyst token

      1. Catalyst project name

      1. Catalyst Project Org ID

  1. To know how to set up a catalyst project, you can try this tutorial on a simple web application.

  1. You need to generate a CLI token for executing commands for your user account from Catalyst CLI by executing the following command:

  1.                   catalyst token:generate

    1. This will initiate the token generation process. The CLI will display a URL that you can visit from any device. It will also generate a device verification code, which you must enter on the web page of the URL.

    1. Navigate to the URL displayed in the CLI and enter the verification code. Click Verify. The code will only be valid for five minutes.

    1. Once your device's CLI is verified, the token will be generated and displayed in your CLI.Do make a copy of that token.

  1. You can find your Catalyst Project name and Catalyst Org ID from the Catalyst Console Homepage: "https://console.catalyst.zoho.com/baas/{OrgID}/index"

CI/CD Setup:

  1. Navigate to the main branch of your Bitbucket repository where you stored your Catalyst project and create a called bitbucket-pipelines.yml which contains the script code to run in CI/CD pipeline.

  1. To know more about the Bitbucket CI/CD pipeline kindly refer here.

  1. After setting up the runners based on your preference you need to paste the below code based on the type of functions your catalyst application is going to run on.

 bitbucket-pipelines.yml 

  1.  image: atlassian/default-image:4
  2. pipelines:
  3.   default:
  4.         - step:
  5.             name: Deploy Catalyst application
  6.             script:
  7.               - apt update
  8.               - apt install software-properties-common -y
  9.               - add-apt-repository ppa:deadsnakes/ppa -y
  10.               - echo "6" | DEBIAN_FRONTEND=noninteractive apt install -y python3.9 python3.9-distutils
  11.               - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  12.               - python3.9 get-pip.py
  13.               - apt -y install openjdk-17-jdk
  14.               - npm install -g zcatalyst-cli@latest
  15.               - catalyst deploy --project ${CATALYST_PROJECT_NAME} --org ${CATALYST_ORG} --token ${CATALYST_TOKEN} 


  • Before committing any changes you need to add the below Values in your repository variables. You can find the help documentation for the same here.

    • CATALYST_PROJECT_NAME - Your Project Name

    • CATALYST_ORG - Your Project Org ID

    • CATALYST_TOKEN - Your catalyst token generated using the command catalyst token:generate

   

After pasting the above-mentioned code snippet in your bitbucket-pipelines.yml file, once you do a commit, the CI/CD pipeline executes the job mentioned in the bitbucket-pipelines.yml file.

    • Announcements

    • React Nexus 2025 Recap: Catalyst Slate in Action!

      Hey Catalyst Community! We recently attended the React Nexus 2025 conference, an exciting gathering for frontend enthusiasts and React developers. Our team had an incredible time presenting and conducting a hands-on workshop on Catalyst Slate, our streamlined
    • [Webinar] A hands-on guide to Catalyst Stratus

      Have you used Catalyst Stratus yet? It’s an object storage service that makes it easy to handle large files — whether they're coming from your Catalyst app or other Zoho apps. We’re hosting a live coding session where you’ll build a working prototype
    • Catalyst Video Tutorials!

      Hello everyone! We’ve been brewing something exciting behind the scenes, and we’re thrilled to finally share it with you- Catalyst video tutorials are here! We recognized that videos are the predominant medium for learning and discovery these days, so
    • [Webinar] Catalyst Cloud Browser in Action: PDF & Web Rendering Solutions for Regulated Industries

      Hi everyone, Have you ever struggled with rigid PDF tools or clunky rendering logic in BFSI or healthcare apps? Do your clients struggle to deliver compliant, dynamic, and automated documents — and most are still stuck with brittle, server-heavy PDF generation?
    • Announcing Catalyst Developer Bootcamps in India - Zoho Community

      Hey everyone! We're excited to announce a set of developer bootcamps dedicated to Catalyst! These bootcamps are aimed to empower developers to build, scale, and deploy applications with speed and precision, using Catalyst. Whether you're a newcomer or

      Catalyst Community