DeployPulse

Automating CodePush Releases with CircleCI

DeployPulse integrates cleanly with CircleCI pipelines. This guide shows how to automate dpctl release-react from a standard CircleCI job without requiring a custom orb — just a Node executor and a few environment variables.


Prerequisites


.circleci/config.yml Example

The example below releases to Production from main and to Staging from develop. dpctl picks up DEPLOYPULSE_ACCESS_KEY from the environment automatically.

version: 2.1

jobs:
  release-production:
    docker:
      - image: cimg/node:20.0
    environment:
      DEPLOYPULSE_ACCESS_KEY: $DEPLOYPULSE_ACCESS_KEY
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: npm ci
      - run:
          name: Install dpctl
          command: |
            git clone https://github.com/deploypulseio/dpctl dpctl
            cd dpctl && npm install && npm run build && npm install -g
      - run:
          name: Release to DeployPulse (Production)
          command: |
            dpctl release-react MyApp-iOS ios \
              --deployment Production \
              --dev false

  release-staging:
    docker:
      - image: cimg/node:20.0
    environment:
      DEPLOYPULSE_ACCESS_KEY: $DEPLOYPULSE_ACCESS_KEY
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: npm ci
      - run:
          name: Install dpctl
          command: |
            git clone https://github.com/deploypulseio/dpctl dpctl
            cd dpctl && npm install && npm run build && npm install -g
      - run:
          name: Release to DeployPulse (Staging)
          command: |
            dpctl release-react MyApp-iOS ios \
              --deployment Staging \
              --dev false

workflows:
  ota-release:
    jobs:
      - release-production:
          filters:
            branches:
              only: main
      - release-staging:
          filters:
            branches:
              only: develop

Staged Rollout

Use --rollout to release to a percentage of users before a full rollout:

- run:
    name: Release to DeployPulse (10% rollout)
    command: |
      dpctl release-react MyApp-iOS ios \
        --deployment Production \
        --dev false \
        --rollout 10

Once you are confident in the release, promote to 100% from the dashboard or with dpctl patch.


Code Signing

To cryptographically sign releases so devices can verify bundle integrity before applying an update, pass --private-key with the path to your private key file:

- run:
    name: Release to DeployPulse (signed)
    command: |
      echo "$CODE_SIGNING_KEY" > /tmp/private.pem
      dpctl release-react MyApp-iOS ios \
        --deployment Production \
        --private-key /tmp/private.pem \
        --dev false

Store the private key contents as a CircleCI environment variable (CODE_SIGNING_KEY). See the Code Signing guide for key generation and app configuration.


Further Reading