Skip to content

A demo project showing a Salesforce project being built with SalesforceDX and Circle CI

Notifications You must be signed in to change notification settings

iagodvsantos/salesforcedx-circleci-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

salesforcedx-circleci-demo

A demo project showing a Salesforce project being built with SalesforceDX and CircleCI

Overview

CircleCI is a Continuous Integration service. This project demonstrates how to use Salesforce DX with Circle.

Follow the instructions below to get started. Also, take a look the SFDX Travis CI. This project is similar in implementation.

Instructions

  1. Generate a an SSL server key and certificate

  2. Convert it to hex for storing in Circle's env variables.

Circle does a nice job of allowing you to set environment variables inside the UI in a protected way. Because OpenSSL likes key files formatted in a particular fashion, we'll convert it to hex for storage in env variables. This will make it easier to create a valid key file on the fly in the build later.

$ xxd -p server.key >> server.key.hex
  1. Set up a Connected App in Salesforce for use with the JWT auth flow.
  • Check Enable OAuth Settings
  • Set the OAuth callback to http://localhost:1717/OauthRedirect
  • Check Use Digital Signatures and add your certificate (likely server.crt) from step (1)
  • Select the required OAuth scopes
  • Once saved, click Manage to set up policies. I used "Admin Approved" for the permitted users and added the correct profiles to the app.
  1. Create a project in github, set it up for use with SFDX, and add source files

  2. Add the project to your CircleCI account

  3. Configure CircleCI variables inside of the settings for your project

  • CONSUMER_KEY: Your Connected App consumer key
  • SERVER_KEY_HEX: The hex version of your server key from step 2
  • SFDC_USER: The username for your Salesforce user
  1. Add the example circle.yml and push some commits to your repo to start building

About

A demo project showing a Salesforce project being built with SalesforceDX and Circle CI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Apex 100.0%