Raghu
Raghu

Reputation: 93

CI/CD Integration for Zoho Catalyst Application

I migrated my Zoho Catalyst application(Client & Functions) to Github. I wish to deploy my application to Catalyst directly whenever I make a commit to my github repository. I couldn't find the relevant help docs for the same. Can someone help me acheive this?

Upvotes: 1

Views: 66

Answers (1)

Prabhu Raam Yogaraj
Prabhu Raam Yogaraj

Reputation: 691

To create a CI/CD implementation for your Catalyst application from your GitHub Repository, you need to check github worflows. You can find the official help documentation for the same here.

You can try using the below code snippet for main.yml which you would need to add under .github/workflow folder inside your github repository.

name: Create Release
on:
  push:
    branches:
      - 'main'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Loading Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '18'
      - name: Loading Java17
        uses: actions/[email protected]
        with:
          java-version: '17'
          distribution: 'oracle'
      - name: Setup Python3.9
        uses: actions/[email protected]
        with:
          python-version: '3.9.15'
      - name: Installing catalyst
        run : npm i -g zcatalyst-cli
      - name: Installing Packages for 'Node'
        run: cd functions/Node/ && npm install --omit=dev
      - name: Deploying code to catalyst
        run: catalyst deploy --project ${{ secrets.CATALYST_PROJECT_NAME}} --org ${{ secrets.CATALYST_ORG}} --token ${{ secrets.CATALYST_TOKEN}}

Before commiting any changes you need to add the below Values in your repository secrets. 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

You can find the offical FAQ documentation for the same here.

Upvotes: 1

Related Questions