GithubHelp home page GithubHelp logo

likith1206 / salesforce-cicd-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salto-io/salesforce-cicd-template

0.0 0.0 0.0 587 KB

SFDX project template for Salto's CI/CD Course

Shell 0.01% JavaScript 10.14% Apex 81.79% CSS 0.48% HTML 7.58%

salesforce-cicd-template's Introduction

Salto CI/CD Course: SFDX Project Template

This repo contains the sample sfdx project and metadata that we recommend using when following Salto's CICD Course.

Installing the source code in trailhead playground orgs

It is highly recommended that you install this project and follow the course using 4 trailhead playground orgs, which will represent the 4 environments in a typical CI/CD pipeline:

  • Your dev sandbox
  • Integration sandbox
  • UAT sandbox
  • Production

Some commands in VSCode behave differently depending on whether you are connected to a scratch org, sandbox or trailhead playground.

The course was tested with trailhead playgrounds so again, it's highly recommended that you do the same.

Create 4 trailhead playgrounds

Go to your trailhead account and create 4 playgrounds.

Follow these steps to reset the password in all 4 playgrounds.

I recommend changing the name of your playgrounds to match the type of sandbox it's meant to represent, for example:

Deploy the source code to all 4 trailhead playgrounds

Create a directory in your computer and clone this repo

git clone https://github.com/salto-io/salesforce-cicd-template
cd salesforce-cicd-template

Run the following command 4 times to authorise sfdx to connect to all your playgrounds and provide an alias (see the --setalias flag).

I recommend that the aliases match the names you used in the previous step, where you renamed your playgrounds. For example:

sfdx auth:web:login -s --setalias cicd-dev-sandbox
sfdx auth:web:login -s --setalias cicd-integration-sandbox
sfdx auth:web:login -s --setalias cicd-uat-sandbox
sfdx auth:web:login -s --setalias cicd-prod

Each time you run the command, you'll be asked to log in to Salesforce.

Make sure each time you log in to a different trailhead playground.

Then, set the default username of the sfdx project for each org, and deploy the code, for example:

sfdx config set defaultusername=cicd-dev-sandbox
sfdx force:source:deploy -p force-app
sfdx config set defaultusername=cicd-integration-sandbox
sfdx force:source:deploy -p force-app
sfdx config set defaultusername=cicd-uat-sandbox
sfdx force:source:deploy -p force-app
sfdx config set defaultusername=cicd-prod
sfdx force:source:deploy -p force-app

After this, the exact same code should be deployed to all your orgs!

Reset Git

Because you cloned this repository, your local version of it its still tied to this remote.

We need to remove this relationship so that we can start with Git from scratch later in the course.

From within the folder salesforce-cicd-template, run the following command:

In linux/mac

sudo rm -rf .git

In Windows

rm -rf .git

Starting the course

You can now set the "dev sandbox" as default, as this is what we'll use to start the course.

sfdx config set defaultusername=cicd-dev-sandbox

salesforce-cicd-template's People

Contributors

pgonzaleznetwork avatar

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.