Deploy to Catalyst
In this section, we’ll look into a sample YAML code to automate the deployment of a basic Catalyst web client and Catalyst Serverless Functions component. This code is applicable to Java, Node.js and Python.
You will have to configure the following keys as global variables in your pipeline. You can refer this help section to learn about configuring variables.
-
PROJECT_NAME : The name of your Catalyst project. You can fetch this value from the General Settings in the console.
-
CATALYST_ORG : The Catalyst organization to which the current project belongs. You can fetch this value from the Multi-Org portal in the console.
-
CATALYST_TOKEN : A unique token to access the Catalyst CLI from the YAML. Refer to this help page to learn more about token generation.
-
USER_NAME : The username of your Docker Hub account.
-
USER_PASSWORD : The password of your Docker Hub account.
copyversion: 1 runners: Machine: config-id: 2 images: DeployMachine: image: ubuntu auth: username: << env.USER_NAME >> password: << env.USER_PASSWORD >> jobs: Deploy_Client_Functions: steps: - apt-get update - apt-get -y install openjdk-17-jdk curl - curl -fsSL https://deb.nodesource.com/setup_18.x | bash - - apt-get install -y nodejs - apt-get update && \ - apt-get install -y software-properties-common wget curl && \ - add-apt-repository ppa:deadsnakes/ppa && \ - apt-get update && \ - apt-get install -y python3.9 python3.9-distutils && \ - wget https://bootstrap.pypa.io/get-pip.py && \ - python3.9 get-pip.py && \ - rm get-pip.py - npm i -g zcatalyst-cli - catalyst -v - cd functions/Node - npm install - cd ../.. - catalyst deploy --project << env.PROJECT_NAME >> --org << env.CATALYST_ORG >> --token << env.CATALYST_TOKEN >> stages: - name: build image: DeployMachine jobs: - Deploy_Client_Functions
Last Updated 2025-05-30 16:54:59 +0530 +0530
Yes
No
Send your feedback to us