Easy Salesforce CI/CD with Open Source Only - Dreamforce 23

Easy Salesforce
CI/CD for everyone
Using open-source only :)
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
Senior Consultant & Project Manager
Jean-Pierre Rizzi
CTO
Nicolas Vuillamy
Cloudity
European Summit Pure Player Partner
CI/CD with Salesforce
Why?
What is a Soware?
UI, Functions and Database make a… version
UI
Built by Designers
Functions
Built by Developers
Database
Built by Database Admins
What is a Salesforce Org?
All this metadata is intertwined
UI
Built by Designers
Functions
Built by Developers
Database
Built by Database Admins !
Page Builder
LWC
Flows
Object Manager
Ok, then what?
We are all Designers!
We are all Database Administrators!
We are all Developers!
We all interact with Salesforce Metadata!
Any metadata update can impact everything!
Without vs with CI/CD - DevOps
With CI/CD
Integ Prod
Scratch
Sandbox
PreProd
Sandbox
All metadata in
git (files &
branches) and
automatically
deployed by
CI/CD servers
update-accounts
billing-config
next-iteration
integration preprod production
Without CI/CD
HotFix
Dev2
Légende
BUGS
BUGS
PreProd
Dev Prod
DEV
ADMIN
RELEASE
MANAGER
Change
Sets
Change
Sets
Change
Sets
Change
Sets
Change
Sets
Metadata
manually
picked and
deployed from
org to org
DevOps with Salesforce
What are my options?
Salesforce DevOps Ecosystem
Many good options!
DevOps Center
3rd-party vendors Homemade
pipelines
Advanced DevOps scripts
using Salesforce DX .
Manually written and
maintained individually on
each client project.
Pre-made pipelines
Advanced DevOps scripts
packaged and maintained in
a single repository
Salesforce DevOps Ecosystem Summary
Setup &
Maintenance
Versioning
Visual User
Interface
Licenses /
Pricing
Modular
packages
3rd party
products 😃 😶 😍 😭
Salesforce
DevOps Center 😶 😶 😶 😍
Homemade
pipeline 😭 😃 😍
DX@Scale
😶 😃 😍 😃
sfdx-hardis
by Cloudity 😃 😃 😃 😍
The open-source
simple option
Homemade pipelines vs sfdx-hardis
Both efficient, and require no licenses, but…
● Requires Advanced DevOps expertise
● Complex setup & maintenance
● Contributors work with command lines
● Requires minimal DevOps expertise
● Easy setup & maintenance
● Contributors work with clicks
Recurring
One-off
Sfdx-hardis: the SFDX CLI plugin!
● Smart sfdx commands orchestrator
● Handles advanced use cases
○ Deployments Overwrite management
● Open-source, fully documented and
maintained by the community
● Ready to use CI/CD Pipelines for Gitlab,
Azure & GitHub (and Bitbucket soon!)
● Leverages other sfdx-plugins
○ sfdx-git-delta: Deployment
○ sfdx-data-move-utility: Data loader
○ texei-sfdx-plugin: Toolbox
○ sfdx-essentials: XML operations
Sfdx-hardis: the VS Code Extension!
● Work with clicks, not command lines !
● Minimal menu for Admins
● Interactive path assistants for
operations
● Open-source, fully documented with
videos and maintained by the
community
● Many extra features for advanced use
https://tinyurl.com/sfdx-hardis-vscode
How does it work?
Implementation Roles
Everybody has a part to play!
Setup Manager
Release Manager
Contributor (Admin, Dev)
Setup Manager
They own the strategy
Installs the CI/CD Pipeline on a Salesforce
project
● Initialize git repository
● Initialize git branches & SF orgs strategy
● Initialize Salesforce DX project
○ without metadatas: incremental
versioning
○ with metadatas: full versioning
● Initialize CI/CD Servers Authentication
Required expertise :
● Git (advanced)
● Salesforce DX
● Salesforce
Admin
Fluido Freelancer
Freelancer
Admin
SmartenUp Freelancer
Examples of branches & orgs strategy
Release Manager
They own the process
Responsible for deployments and respect
of CI/CD best practices
● Validates Merge Requests submitted
by Contributors
● Triggers deployments to major orgs
(UAT, Preprod, Prod)
● Assists Contributors
○ Provides /refresh dev Sandboxes used
for config & dev
○ Solves merge conflicts
○ Maintain CI/CD configuration
Required expertise :
● Git (basics)
● Salesforce DX
● Salesforce
Algeco Yooz Yooz Admin
Contributor
They own the features… and use your pipeline everyday!
Customize Salesforce according to the
requirements
● Design: Layouts, Lightning pages, LWC
● Functions: Automations,
Configuration, Apex
● Database: Build Object Model
● Create Merge Request to publish
their work at the upper level in the
branch hierarchy
Required expertise :
● Salesforce
● Read a doc
● Watch videos
Freelancer SmartenUp
You ?
How to work as a
contributor?
Start your work
Just learn simple git and sfdx commands… OR…
● git checkout integration
● git pull
● git checkout -b features/dev/my-updates
integration
● sfdx auth:web:login --setdefaultusername
--instanceurl https://test.salesforce.com
● sfdx force:source:tracking:clear --noprompt
● sfdx force:source:push -g -w 60 --forceoverwrite
● sfdx force:apex:execute -f init-script.apex
● sfdx force:user:permset:assign -n
MYPERMISSIONSET -u YOURUSERNAME
● sfdx sfdmu:run --sourceusername
YOURUSERNAME -p SFDMUPROJECT
--noprompt
Click on SFDX-Hardis menu action:
Commit your work
Just learn simple git and sfdx commands… OR…
● sfdx force:source:pull
● sfdx:force:source:retrieve –m
CustomApplication:MYAPPLICATION
● git add file1
● git add file2.xml
● git add file3.xml
● git commit –m MyCommitMessage
Click on SFDX-Hardis menu action:
… and select and commit files using
VsCode git extension (still CLICKS ONLY !)
Prepare your Merge Request
Just learn simple git and sfdx commands… OR…
● Update manually package.xml and
destructiveChanges.xml files
● Remove permissions from Profiles as they will be
deprecated
● Remove System.debug in apex
● And again some commands !
● git add manifest/package.xml
● git add manifest/destructiveChanges.xml
● git commit –m
MyPackageConfigCommitMessage
● git push –set-upstream
origin/YOURBRANCHNAME
Click on SFDX-Hardis menu action:
Create your Merge Request in UI
Merge Request checks
Prevent technical debt from the start !
● Deployment simulation
○ Be sure your deployment will succeed!
● Quality gate with MegaLinter
○ Apex
○ LWC
○ Security (hard-coded tokens…)
○ Excessive copy-pastes
○ Coming soon: Flow Linter!
Contributors: “Oops, what are those errors?”
Contributors: Easily solve deployment errors!
Automated messages on Merge Requests!
… or call the Release Manager :)
Solve with human instructions…
Demo time!
https://youtu.be/zEYqTd2txU4
New in sfdx-hardis since… today !
DREAMFORCE ANNOUNCEMENT
+
Sfdx-hardis Slack Integration
Follow your deployments in your own slack channels !
Credits
They coded in sfdx-hardis!
Yooz
Salesforce CaseNine
Fluido Freelancer
Admin
Credits
They inspired features for SFDX-Hardis!
Texei Salesforce
Algeco
Salto.io
Artist
DX@Scale
Admin Admin
You ?
Dreamforce
Thanks to all users!
● Full documentation
● Video tutorials
● Community Support available!
https://sfdx-hardis.cloudity.com
RAD Women needs your help!
radwomen.org/be-a-part-of-radwomen/
@radwomencode
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
Thank you
1 of 39

More Related Content

Recently uploaded(20)

Green Leaf Consulting: Capabilities DeckGreen Leaf Consulting: Capabilities Deck
Green Leaf Consulting: Capabilities Deck
GreenLeafConsulting147 views
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation22 views
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver20 views
ThroughputThroughput
Throughput
Moisés Armani Ramírez25 views

Easy Salesforce CI/CD with Open Source Only - Dreamforce 23

  • 1. Easy Salesforce CI/CD for everyone Using open-source only :)
  • 3. Senior Consultant & Project Manager Jean-Pierre Rizzi CTO Nicolas Vuillamy
  • 6. What is a Soware? UI, Functions and Database make a… version UI Built by Designers Functions Built by Developers Database Built by Database Admins
  • 7. What is a Salesforce Org? All this metadata is intertwined UI Built by Designers Functions Built by Developers Database Built by Database Admins ! Page Builder LWC Flows Object Manager
  • 8. Ok, then what? We are all Designers! We are all Database Administrators! We are all Developers! We all interact with Salesforce Metadata! Any metadata update can impact everything!
  • 9. Without vs with CI/CD - DevOps With CI/CD Integ Prod Scratch Sandbox PreProd Sandbox All metadata in git (files & branches) and automatically deployed by CI/CD servers update-accounts billing-config next-iteration integration preprod production Without CI/CD HotFix Dev2 Légende BUGS BUGS PreProd Dev Prod DEV ADMIN RELEASE MANAGER Change Sets Change Sets Change Sets Change Sets Change Sets Metadata manually picked and deployed from org to org
  • 10. DevOps with Salesforce What are my options?
  • 11. Salesforce DevOps Ecosystem Many good options! DevOps Center 3rd-party vendors Homemade pipelines Advanced DevOps scripts using Salesforce DX . Manually written and maintained individually on each client project. Pre-made pipelines Advanced DevOps scripts packaged and maintained in a single repository
  • 12. Salesforce DevOps Ecosystem Summary Setup & Maintenance Versioning Visual User Interface Licenses / Pricing Modular packages 3rd party products 😃 😶 😍 😭 Salesforce DevOps Center 😶 😶 😶 😍 Homemade pipeline 😭 😃 😍 DX@Scale 😶 😃 😍 😃 sfdx-hardis by Cloudity 😃 😃 😃 😍
  • 14. Homemade pipelines vs sfdx-hardis Both efficient, and require no licenses, but… ● Requires Advanced DevOps expertise ● Complex setup & maintenance ● Contributors work with command lines ● Requires minimal DevOps expertise ● Easy setup & maintenance ● Contributors work with clicks Recurring One-off
  • 15. Sfdx-hardis: the SFDX CLI plugin! ● Smart sfdx commands orchestrator ● Handles advanced use cases ○ Deployments Overwrite management ● Open-source, fully documented and maintained by the community ● Ready to use CI/CD Pipelines for Gitlab, Azure & GitHub (and Bitbucket soon!) ● Leverages other sfdx-plugins ○ sfdx-git-delta: Deployment ○ sfdx-data-move-utility: Data loader ○ texei-sfdx-plugin: Toolbox ○ sfdx-essentials: XML operations
  • 16. Sfdx-hardis: the VS Code Extension! ● Work with clicks, not command lines ! ● Minimal menu for Admins ● Interactive path assistants for operations ● Open-source, fully documented with videos and maintained by the community ● Many extra features for advanced use https://tinyurl.com/sfdx-hardis-vscode
  • 17. How does it work?
  • 18. Implementation Roles Everybody has a part to play! Setup Manager Release Manager Contributor (Admin, Dev)
  • 19. Setup Manager They own the strategy Installs the CI/CD Pipeline on a Salesforce project ● Initialize git repository ● Initialize git branches & SF orgs strategy ● Initialize Salesforce DX project ○ without metadatas: incremental versioning ○ with metadatas: full versioning ● Initialize CI/CD Servers Authentication Required expertise : ● Git (advanced) ● Salesforce DX ● Salesforce Admin Fluido Freelancer Freelancer Admin SmartenUp Freelancer
  • 20. Examples of branches & orgs strategy
  • 21. Release Manager They own the process Responsible for deployments and respect of CI/CD best practices ● Validates Merge Requests submitted by Contributors ● Triggers deployments to major orgs (UAT, Preprod, Prod) ● Assists Contributors ○ Provides /refresh dev Sandboxes used for config & dev ○ Solves merge conflicts ○ Maintain CI/CD configuration Required expertise : ● Git (basics) ● Salesforce DX ● Salesforce Algeco Yooz Yooz Admin
  • 22. Contributor They own the features… and use your pipeline everyday! Customize Salesforce according to the requirements ● Design: Layouts, Lightning pages, LWC ● Functions: Automations, Configuration, Apex ● Database: Build Object Model ● Create Merge Request to publish their work at the upper level in the branch hierarchy Required expertise : ● Salesforce ● Read a doc ● Watch videos Freelancer SmartenUp You ?
  • 23. How to work as a contributor?
  • 24. Start your work Just learn simple git and sfdx commands… OR… ● git checkout integration ● git pull ● git checkout -b features/dev/my-updates integration ● sfdx auth:web:login --setdefaultusername --instanceurl https://test.salesforce.com ● sfdx force:source:tracking:clear --noprompt ● sfdx force:source:push -g -w 60 --forceoverwrite ● sfdx force:apex:execute -f init-script.apex ● sfdx force:user:permset:assign -n MYPERMISSIONSET -u YOURUSERNAME ● sfdx sfdmu:run --sourceusername YOURUSERNAME -p SFDMUPROJECT --noprompt Click on SFDX-Hardis menu action:
  • 25. Commit your work Just learn simple git and sfdx commands… OR… ● sfdx force:source:pull ● sfdx:force:source:retrieve –m CustomApplication:MYAPPLICATION ● git add file1 ● git add file2.xml ● git add file3.xml ● git commit –m MyCommitMessage Click on SFDX-Hardis menu action: … and select and commit files using VsCode git extension (still CLICKS ONLY !)
  • 26. Prepare your Merge Request Just learn simple git and sfdx commands… OR… ● Update manually package.xml and destructiveChanges.xml files ● Remove permissions from Profiles as they will be deprecated ● Remove System.debug in apex ● And again some commands ! ● git add manifest/package.xml ● git add manifest/destructiveChanges.xml ● git commit –m MyPackageConfigCommitMessage ● git push –set-upstream origin/YOURBRANCHNAME Click on SFDX-Hardis menu action:
  • 27. Create your Merge Request in UI
  • 28. Merge Request checks Prevent technical debt from the start ! ● Deployment simulation ○ Be sure your deployment will succeed! ● Quality gate with MegaLinter ○ Apex ○ LWC ○ Security (hard-coded tokens…) ○ Excessive copy-pastes ○ Coming soon: Flow Linter!
  • 29. Contributors: “Oops, what are those errors?”
  • 30. Contributors: Easily solve deployment errors! Automated messages on Merge Requests! … or call the Release Manager :) Solve with human instructions…
  • 32. New in sfdx-hardis since… today ! DREAMFORCE ANNOUNCEMENT +
  • 33. Sfdx-hardis Slack Integration Follow your deployments in your own slack channels !
  • 34. Credits They coded in sfdx-hardis! Yooz Salesforce CaseNine Fluido Freelancer Admin
  • 35. Credits They inspired features for SFDX-Hardis! Texei Salesforce Algeco Salto.io Artist DX@Scale Admin Admin You ? Dreamforce
  • 36. Thanks to all users! ● Full documentation ● Video tutorials ● Community Support available! https://sfdx-hardis.cloudity.com
  • 37. RAD Women needs your help! radwomen.org/be-a-part-of-radwomen/ @radwomencode