Coder Social home page Coder Social logo

coding-with-the-force / dreamforce2018 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sophienyaa/dreamforce2018

0.0 0.0 1.0 8 KB

Example Circle CI Setup from my Dreamforce 2018 Talk

Home Page: https://mickwheelz.net/index.php/2018/10/03/continuous-integration-with-github-sfdx-and-circleci-easier-than-you-think/

License: MIT License

Shell 84.63% CSS 0.99% Apex 14.39%

dreamforce2018's Introduction

Continuous Integration with GitHub, SFDX and CircleCI ...Easier than you think!

I hope you enjoyed my talk at Dreamforce 2018!

You can use this repository as a base for setting up your own continuous integration workflow!

This repository contains build scripts (located in the build/ folder) and an example config.yml file in the .circleci/ folder to get you started

Getting Started

  1. You first need to create a certificate and key to authenticate with. To do this you can run the script in build/generate-keys.sh

    • Follow the prompts when creating the certificate files
    • Take note of the Base64 output, as you will need this to set up CircleCI later
  2. You will need to create a connected app in your production (and any sandboxes you wish to use CI with)

    • First, from Setup, enter App in the Quick Find box, then select App Manager. Click New Connected App.
    • Give your application a name such as 'CircleCI'
    • Make sure you check Enable OAuth Settings in the connected app
    • Set the OAuth callback to http://localhost:1717/OauthRedirect
    • Check Use Digital Signatures and add your certificate file (server.crt), this will be in the build/ folder. Once you have done this delete this file
    • Select the required OAuth scopes
    • Make sure that refresh is enabled - otherwise you'll get this error: user hasn't approved this consumer
    • Ensure that Admin approved users are pre-authorized under Permitted Users is selected
    • Ensure that you allow the System Administrator profile is selected under the Profiles related list
    • Take note of the Consumer Key as you will need it for CircleCI
  3. You now can set up your CircleCI build

    • Open CircleCI and click on Add Projects choose your GitHub repository and click Set Up Project then click Start building there is an example config.yml in this repository already. You can edit this to suit your needs.

    • Cancel the first build, as it will fail without any enviornment variables set

    • Click the gear icon next to the repository name on the left hand side of the screen

    • In the settings screen, choose Environment Variables you will need to add three variables by clicking Add Variable

      • SFDC_SERVER_KEY is the Base64 output generated in Step 1
      • SFDC_PROD_CLIENTID is the Consumer Key from Step 2
      • SFDC_PROD_USER is the user to use with CircleCI
    • You can now re-run the first build.

You are now ready to build your salesforce projects with CircleCI!

dreamforce2018's People

Forkers

sf-xuyan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.