GitHub
Catalyst
Deploy Via Azure DevOps Pipeline

Deploy Via Azure DevOps Pipeline

Deploy functions and client Via Azure DevOps Pipeline.

Prerequisites:

Optional:

You can remove the --verbose flag from the catalyst deploy command to hide the output logs.

YAML Script:

trigger:
  branches:
    include:
      - master # Trigger only on pushes to the main branch. Change to your branch name.
 
variables:
  PROJECT_ID: "{REPLACE_WITH_YOUR_PROJECT_ID}" # Catalyst project ID
  NODE_VERSION: "18"
 
jobs:
  - job: DeployClient
    displayName: "Deploy Client"
    pool:
      vmImage: ubuntu-latest
 
    steps:
      - checkout: self
        displayName: "Checkout code"
 
      - task: NodeTool@0
        inputs:
          versionSpec: $(NODE_VERSION)
        displayName: "Setup Node.js and Install Dependencies"
 
      - script: |
          npm install -g zcatalyst-cli
          cd dashboard
          npm install zcatalyst-cli-plugin-react --save-dev
        displayName: "Install zcatalyst-cli"
 
      - script: |
          catalyst deploy --only client --project $(PROJECT_ID) --token $(CATALYST_TOKEN) --verbose
        displayName: "Deploy Client"
        env:
          CATALYST_TOKEN: $(CATALYST_TOKEN) # Requires catalyst token secret
 
  - job: DeployFunctions
    displayName: "Deploy Functions"
    pool:
      vmImage: ubuntu-latest
 
    steps:
      - checkout: self
        displayName: "Checkout code"
 
      - task: NodeTool@0
        inputs:
          versionSpec: $(NODE_VERSION)
        displayName: "Setup Node.js and Install Dependencies"
 
      - script: |
          npm install -g zcatalyst-cli
        displayName: "Install zcatalyst-cli"
 
      - script: |
          catalyst deploy --only functions --project $(PROJECT_ID) --token $(CATALYST_TOKEN) --verbose
        displayName: "Deploy Functions"
        env:
          CATALYST_TOKEN: $(CATALYST_TOKEN) # Requires catalyst token secret