Skip to content

praksb/Salesforce-sfdx-cli-orb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salesforce-sfdx orb CircleCI Build Status CircleCI Community

Install, authenticate with, and utilize the Salesforce sfdx CLI on CircleCI with ease.

Orb Registry

Read the full automated documentation live on the Orb Registry:

Prerequisites

  1. Enable Dev Hub
  2. Create a private key with OpenSSL
  3. Create a connected app

Base64 encode your private key

Navigate to the directory containing the self signed certificate files you created earlier and enter the following command: base64 server.key. Once you have the base64 encoded value, copy it for the next step.

Add environment variables

https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project

  • SFDX_JWT_KEY This value must contain the base64 encoded value of the private server.key file.
  • SFDX_CONSUMER_KEY The consumer key of the connected app for salesforce

Example

version: 2.1
  orbs:
    sfdx: circleci/[email protected]
  jobs:
    install_authenticate:
      executor: sfdx/default
      steps:
        - checkout
        - sfdx/install
        - sfdx/auth:
            defaultusername: [email protected]
        - run:
            name: Run your SFDX commands here
            command: |
              echo "You now have access to the sfdx cli and may execute commands against it. https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm"
              sfdx force:auth:list
  workflows:
    basic-test:
      jobs:
        - install_authenticate

Blog post

Read our announcement post here:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published