SlideShare a Scribd company logo
Simplified CI/CD
flows for SFDX
via Bitbucket Pipelines
Hello!
I’m Abhinav Gupta
- Salesforce MVP (8x) & Architect
- Started with Java in 2004, Salesforce journey
started in 2008.
2
Agenda
▪ Getting comfortable with CI & CD.
▪ Deciding right CI/CD tool.
▪ Bitbucket Pipelines via SFDX and Scratch Orgs.
3
Prerequisite
SFDX
• One can use ANT migration tool, but SFDX with scratch orgs etc makes it very easy and quick.
GIT (VCS)
• Clients like “Source Tree” and many others don’t require a geek level command line expertise.
• Having basic idea of commits, pull, push, branching and pull requests is good starting point.
Scripting / Shell
• Not really, Salesforce team gave a very good script which is good and doesn’t needs editing.
• Basic scripting is not that hard.
Discipline / Process
• A well defined process to use feature and bug branches, and code reviews before the solution is merged
back into master, possibly via QA > UAT branches.
4
You must be the change you wish to
see in the world.
- Mahatma Gandhi
6
What is
CI/CD ?
Hand raise please!
7
Image by Karen Arnold from Pixabay
Remember this Pyramid
8
Continuous
Deployment
Continuous
Delivery
Continuous
Integration
GIT + SFDX
What is CI?
▪CI == Continuous Integration
▪Changes are often merged back to the main branch.
▪Validate stability and integrity of app post merge, by creating a
new build and running automated tests against the same.
▪Avoid shocks/surprises/errors, when merged code is build for
release/deployments.
9
CI’s Lifeline
▪Top quality unit and other automation tests.
▪No CI tool can succeed with coverage only test cases.
▪ISV’s/SI’s - Adding efforts for unit tests in scope, will build good
relations and less nightmares.
▪Not just Apex unit tests, but Aura and LWC can also be unit
tested via Jest, Jasmine, Mocha etc.
10
Bad Test Example
▪Code Coverage Test
only
▪No assertions of
business logic and
results/state.
11
Real life
It’s easy
▪ To break one thing while fixing others.
▪ To ignore minor dependencies between components.
▪ To ship the same (in absence of QA, or release pressure).
Imagine this with multi developers, and modules in medium/large scale
projects.
12
CD : Delivery vs Deployment
13
Image Source: https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment
Deciding
CI/CD Tool
14
External Tools
• Not a part of your repo / git hosting
service.
• New subscription ($$)
• Configure private/internal hosting or on
the cloud.
• Offer limited free build minutes /
concurrency.
Examples: Jenkins, CircleCI, TravisCI
External vs Internal
15
Internal Tools
• Are part of your repo / git hosting service.
• No new subscription $$ (mostly).
• No need to setup extra server or hosting.
• Virtual/Docker runtime + Scripts.
Examples: Bitbucket/Gitlab Pipelines, and
Github Actions
Internal Tools - Advantage
▪ No extra CI server to configure.
▪ No extra subscription to buy.
▪ No extra login/credentials/permissions to manage.
▪ Code / IP is not exposed to external servers, which could
be insecure. Specially, CI tool configured on a poorly
secured internal servers.
Imagine configuring Jenkins, its required plugins, keeping the
server live, and secure.
16
Internal Tools - Advantage
▪ External tools might required access to all GIT projects,
which an enterprise might not want to expose to a 3rd party
CI.
▪ Just commit a XML/YML config file for enabling CI/CD in any
repo.
▪ Git repo auto starts Docker image, and runs the script.
▪ CI results, permissions are well integrated in the repo only.
▪ Bottom Line: Pipelines and internal CI tools are very good for
small/medium projects, with quick build times and not huge 17
Bitbucket Pipelines
18
Scratch Orgs
Before we move ahead
CI/CD with Scratch orgs and SFDX is quite powerful, yet
simple! i.e.
• Create scratch org (quickly)
• Push code (quickly again)
• Run all tests (Integration checked)
• Create packages (Release) – optional.
• Dispose/delete the scratch org to give a clean slate for next
time.
All this could be done automatically via a simple shell script.
19
Bitbucket Pricing
https://bitbucket.org/product/pricing
20
Bitbucket + SFDX
https://github.com/forcedotcom/sfdx-bitbucket-package
^ Above open source repo from Salesforce is well documented
example.
It clearly shows:
▪ How to setup connected apps.
▪ Using JWT grants via SFDX for automated/headless
authentication.
▪ A functional bitbucket-pipelines.yml file, with all CI/CD
steps.
▪ It shouldn’t take more than 15-20 mins to configure all of the
steps mentioned in the README.
21
Bitbucket Script's key SFDX commands
- sfdx force:org:create: Creates new scratch org
- sfdx force:source:push : Pushes source code in the scratch org
- sfdx force:apex:test:run : Executes Apex test cases
- sfdx force:org:delete: Deletes the scratch org
Optional / Additional Steps
- sfdx force:package:version:create: Creates a new package
- sfdx force:package:install: Installs a given package into an org.
- sfdx force:apex:test:run
- sfdx force:org:delete
22
Before we get too excited
23
Edition Active Scratch
Org Allocation
Daily Scratch
Org Allocation
Developer Edition or trial 3 6
Enterprise Edition 40 80
Unlimited Edition 100 200
Performance Edition 100 200
Practical CI/CD
▪ Plan CI/CD based on
- availability of scratch orgs on daily basis.
- build minutes available with your pricing plan.
▪ It’s quite easy to overdo CI, if applied to all branches.
▪ Imagine, scratch orgs getting created on commit in any branch.
▪ Add unit testing code in key release branches, like TEST, QA, UAT.
Avoid it in hotfix, feature etc.
24
Tuning script at branch level
25
GitHub Users
▪ Watch out GitHub Actions.
▪ Currently in BETA, with invite only access.
▪ They are quite powerful and advanced CI/CD solutions.
▪ Probably best of the cult.
▪ Schedule vs Events.
▪ Steps, Actions, Tasks and much more
https://help.github.com/en/articles/about-github-actions
26
References
• Salesforce Bitbucket CI/CD Sample Repo:
- https://github.com/forcedotcom/sfdx-bitbucket-package
• Atlassian Blog on CI/CD
- https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment
• Trailheads
- https://trailhead.salesforce.com/en/content/learn/modules/git-and-git-hub-basics
- https://trailhead.salesforce.com/en/content/learn/modules/sfdx_app_dev
- https://trailhead.salesforce.com/en/content/learn/modules/sfdx_travis_ci
27
Thanks!
Any questions?
You can find me at
▪ @abhinavguptas
▪ abhinav@concret.io
28

More Related Content

What's hot

Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
Albert Suwandhi
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
Nicola Baldi
 
Gitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operationsGitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operations
Mariano Cunietti
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
Noa Harel
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Sunnyvale
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java world
Ashok Kumar
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
Tilton2
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
Kasun Kodagoda
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Matthew David
 
Understanding Monorepos
Understanding MonoreposUnderstanding Monorepos
Understanding Monorepos
Benjamin Cabanes
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
Juraj Hantak
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
Billy Yuen
 
Azure Infrastructure as Code and Hashicorp Terraform
Azure Infrastructure as Code and Hashicorp TerraformAzure Infrastructure as Code and Hashicorp Terraform
Azure Infrastructure as Code and Hashicorp Terraform
Alex Mags
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
Dan MAGIER
 
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
choi sungwook
 
GitLab for CI/CD process
GitLab for CI/CD processGitLab for CI/CD process
GitLab for CI/CD process
HYS Enterprise
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
Azure DevOps
Azure DevOpsAzure DevOps
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps Journey
DevOps.com
 

What's hot (20)

Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
 
Gitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operationsGitops: a new paradigm for software defined operations
Gitops: a new paradigm for software defined operations
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java world
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Understanding Monorepos
Understanding MonoreposUnderstanding Monorepos
Understanding Monorepos
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
 
Azure Infrastructure as Code and Hashicorp Terraform
Azure Infrastructure as Code and Hashicorp TerraformAzure Infrastructure as Code and Hashicorp Terraform
Azure Infrastructure as Code and Hashicorp Terraform
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
 
GitLab for CI/CD process
GitLab for CI/CD processGitLab for CI/CD process
GitLab for CI/CD process
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Azure DevOps
Azure DevOpsAzure DevOps
Azure DevOps
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps Journey
 

Similar to Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney

Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepins
Linards Liep
 
Enterprise-Grade DevOps Solutions for a Start Up Budget
Enterprise-Grade DevOps Solutions for a Start Up BudgetEnterprise-Grade DevOps Solutions for a Start Up Budget
Enterprise-Grade DevOps Solutions for a Start Up Budget
DevOps.com
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Lean IT Consulting
 
Использование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийИспользование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложений
Vitebsk Miniq
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
Daniel Stange
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
DevOps.com
 
Automating the Quality
Automating the QualityAutomating the Quality
Automating the Quality
Dejan Vukmirovic
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
DataWorks Summit
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
Evans Ye
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
Weaveworks
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
Roberto Pérez Alcolea
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
Md Jawed
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
Eklove Mohan
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
Rob Scaduto
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Richard Bullington-McGuire
 
Jenkins workflows and Best Practices
Jenkins workflows and Best PracticesJenkins workflows and Best Practices
Jenkins workflows and Best Practices
Kenichi Shibata
 
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseContinuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
VMware Tanzu
 
Docs as Code: Publishing Processes for API Experiences
Docs as Code: Publishing Processes for API ExperiencesDocs as Code: Publishing Processes for API Experiences
Docs as Code: Publishing Processes for API Experiences
Anne Gentle
 
Node.js what's next (Index 2018)
Node.js what's next (Index 2018)Node.js what's next (Index 2018)
Node.js what's next (Index 2018)
Gibson Fahnestock
 

Similar to Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney (20)

Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepins
 
Enterprise-Grade DevOps Solutions for a Start Up Budget
Enterprise-Grade DevOps Solutions for a Start Up BudgetEnterprise-Grade DevOps Solutions for a Start Up Budget
Enterprise-Grade DevOps Solutions for a Start Up Budget
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
Использование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложенийИспользование AzureDevOps при разработке микросервисных приложений
Использование AzureDevOps при разработке микросервисных приложений
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
 
Automating the Quality
Automating the QualityAutomating the Quality
Automating the Quality
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Jenkins workflows and Best Practices
Jenkins workflows and Best PracticesJenkins workflows and Best Practices
Jenkins workflows and Best Practices
 
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseContinuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
 
Docs as Code: Publishing Processes for API Experiences
Docs as Code: Publishing Processes for API ExperiencesDocs as Code: Publishing Processes for API Experiences
Docs as Code: Publishing Processes for API Experiences
 
Node.js what's next (Index 2018)
Node.js what's next (Index 2018)Node.js what's next (Index 2018)
Node.js what's next (Index 2018)
 

More from Abhinav Gupta

What is Einstein Data Detect?
What is Einstein Data Detect?What is Einstein Data Detect?
What is Einstein Data Detect?
Abhinav Gupta
 
Salesforce 2023 Recap
Salesforce 2023 RecapSalesforce 2023 Recap
Salesforce 2023 Recap
Abhinav Gupta
 
Safeguarding Salesforce: Mastering Data Security with Data Mask
Safeguarding Salesforce: Mastering Data Security with Data MaskSafeguarding Salesforce: Mastering Data Security with Data Mask
Safeguarding Salesforce: Mastering Data Security with Data Mask
Abhinav Gupta
 
🤖 Understanding 4 Waves of AI
🤖 Understanding 4 Waves of AI 🤖 Understanding 4 Waves of AI
🤖 Understanding 4 Waves of AI
Abhinav Gupta
 
AI & Evolving Customer Trust Dynamics (1).pdf
AI & Evolving Customer Trust Dynamics  (1).pdfAI & Evolving Customer Trust Dynamics  (1).pdf
AI & Evolving Customer Trust Dynamics (1).pdf
Abhinav Gupta
 
Salesforce Functions History - Launch to Retirement (2019-2023)
Salesforce Functions History - Launch to Retirement (2019-2023)Salesforce Functions History - Launch to Retirement (2019-2023)
Salesforce Functions History - Launch to Retirement (2019-2023)
Abhinav Gupta
 
Unlocking the Puzzle of Modern Customer Wants.pdf
Unlocking the Puzzle of Modern  Customer Wants.pdfUnlocking the Puzzle of Modern  Customer Wants.pdf
Unlocking the Puzzle of Modern Customer Wants.pdf
Abhinav Gupta
 
NFT Collectors - Understanding AI Puke Art
NFT Collectors - Understanding AI Puke ArtNFT Collectors - Understanding AI Puke Art
NFT Collectors - Understanding AI Puke Art
Abhinav Gupta
 
What’s Web3 for Salesforce?
What’s Web3 for Salesforce?What’s Web3 for Salesforce?
What’s Web3 for Salesforce?
Abhinav Gupta
 
Generative AI Art - The Dark Side
Generative AI Art - The Dark SideGenerative AI Art - The Dark Side
Generative AI Art - The Dark Side
Abhinav Gupta
 
Whats, Whys and Hows of NFTs?
Whats, Whys and Hows of NFTs?Whats, Whys and Hows of NFTs?
Whats, Whys and Hows of NFTs?
Abhinav Gupta
 
Mental Peace at Work during Pandemic
Mental Peace at Work during PandemicMental Peace at Work during Pandemic
Mental Peace at Work during Pandemic
Abhinav Gupta
 
Salesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min SummarySalesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min Summary
Abhinav Gupta
 
Building a layoff proof career
Building a layoff proof careerBuilding a layoff proof career
Building a layoff proof career
Abhinav Gupta
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & Salesforce
Abhinav Gupta
 
Dreamforce 2015 Session - Angular-ifying your visualforce pages
Dreamforce 2015 Session - Angular-ifying your visualforce pagesDreamforce 2015 Session - Angular-ifying your visualforce pages
Dreamforce 2015 Session - Angular-ifying your visualforce pages
Abhinav Gupta
 
Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar
Abhinav Gupta
 
Building Chrome Extensions For Salesforce
Building Chrome Extensions  For SalesforceBuilding Chrome Extensions  For Salesforce
Building Chrome Extensions For Salesforce
Abhinav Gupta
 
Learning salesforce-mobile-way
Learning salesforce-mobile-wayLearning salesforce-mobile-way
Learning salesforce-mobile-way
Abhinav Gupta
 
Parsing XML & JSON in Apex
Parsing XML & JSON in ApexParsing XML & JSON in Apex
Parsing XML & JSON in Apex
Abhinav Gupta
 

More from Abhinav Gupta (20)

What is Einstein Data Detect?
What is Einstein Data Detect?What is Einstein Data Detect?
What is Einstein Data Detect?
 
Salesforce 2023 Recap
Salesforce 2023 RecapSalesforce 2023 Recap
Salesforce 2023 Recap
 
Safeguarding Salesforce: Mastering Data Security with Data Mask
Safeguarding Salesforce: Mastering Data Security with Data MaskSafeguarding Salesforce: Mastering Data Security with Data Mask
Safeguarding Salesforce: Mastering Data Security with Data Mask
 
🤖 Understanding 4 Waves of AI
🤖 Understanding 4 Waves of AI 🤖 Understanding 4 Waves of AI
🤖 Understanding 4 Waves of AI
 
AI & Evolving Customer Trust Dynamics (1).pdf
AI & Evolving Customer Trust Dynamics  (1).pdfAI & Evolving Customer Trust Dynamics  (1).pdf
AI & Evolving Customer Trust Dynamics (1).pdf
 
Salesforce Functions History - Launch to Retirement (2019-2023)
Salesforce Functions History - Launch to Retirement (2019-2023)Salesforce Functions History - Launch to Retirement (2019-2023)
Salesforce Functions History - Launch to Retirement (2019-2023)
 
Unlocking the Puzzle of Modern Customer Wants.pdf
Unlocking the Puzzle of Modern  Customer Wants.pdfUnlocking the Puzzle of Modern  Customer Wants.pdf
Unlocking the Puzzle of Modern Customer Wants.pdf
 
NFT Collectors - Understanding AI Puke Art
NFT Collectors - Understanding AI Puke ArtNFT Collectors - Understanding AI Puke Art
NFT Collectors - Understanding AI Puke Art
 
What’s Web3 for Salesforce?
What’s Web3 for Salesforce?What’s Web3 for Salesforce?
What’s Web3 for Salesforce?
 
Generative AI Art - The Dark Side
Generative AI Art - The Dark SideGenerative AI Art - The Dark Side
Generative AI Art - The Dark Side
 
Whats, Whys and Hows of NFTs?
Whats, Whys and Hows of NFTs?Whats, Whys and Hows of NFTs?
Whats, Whys and Hows of NFTs?
 
Mental Peace at Work during Pandemic
Mental Peace at Work during PandemicMental Peace at Work during Pandemic
Mental Peace at Work during Pandemic
 
Salesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min SummarySalesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min Summary
 
Building a layoff proof career
Building a layoff proof careerBuilding a layoff proof career
Building a layoff proof career
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & Salesforce
 
Dreamforce 2015 Session - Angular-ifying your visualforce pages
Dreamforce 2015 Session - Angular-ifying your visualforce pagesDreamforce 2015 Session - Angular-ifying your visualforce pages
Dreamforce 2015 Session - Angular-ifying your visualforce pages
 
Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar
 
Building Chrome Extensions For Salesforce
Building Chrome Extensions  For SalesforceBuilding Chrome Extensions  For Salesforce
Building Chrome Extensions For Salesforce
 
Learning salesforce-mobile-way
Learning salesforce-mobile-wayLearning salesforce-mobile-way
Learning salesforce-mobile-way
 
Parsing XML & JSON in Apex
Parsing XML & JSON in ApexParsing XML & JSON in Apex
Parsing XML & JSON in Apex
 

Recently uploaded

SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 

Recently uploaded (20)

SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 

Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney

  • 1. Simplified CI/CD flows for SFDX via Bitbucket Pipelines
  • 2. Hello! I’m Abhinav Gupta - Salesforce MVP (8x) & Architect - Started with Java in 2004, Salesforce journey started in 2008. 2
  • 3. Agenda ▪ Getting comfortable with CI & CD. ▪ Deciding right CI/CD tool. ▪ Bitbucket Pipelines via SFDX and Scratch Orgs. 3
  • 4. Prerequisite SFDX • One can use ANT migration tool, but SFDX with scratch orgs etc makes it very easy and quick. GIT (VCS) • Clients like “Source Tree” and many others don’t require a geek level command line expertise. • Having basic idea of commits, pull, push, branching and pull requests is good starting point. Scripting / Shell • Not really, Salesforce team gave a very good script which is good and doesn’t needs editing. • Basic scripting is not that hard. Discipline / Process • A well defined process to use feature and bug branches, and code reviews before the solution is merged back into master, possibly via QA > UAT branches. 4
  • 5. You must be the change you wish to see in the world. - Mahatma Gandhi
  • 7. Hand raise please! 7 Image by Karen Arnold from Pixabay
  • 9. What is CI? ▪CI == Continuous Integration ▪Changes are often merged back to the main branch. ▪Validate stability and integrity of app post merge, by creating a new build and running automated tests against the same. ▪Avoid shocks/surprises/errors, when merged code is build for release/deployments. 9
  • 10. CI’s Lifeline ▪Top quality unit and other automation tests. ▪No CI tool can succeed with coverage only test cases. ▪ISV’s/SI’s - Adding efforts for unit tests in scope, will build good relations and less nightmares. ▪Not just Apex unit tests, but Aura and LWC can also be unit tested via Jest, Jasmine, Mocha etc. 10
  • 11. Bad Test Example ▪Code Coverage Test only ▪No assertions of business logic and results/state. 11
  • 12. Real life It’s easy ▪ To break one thing while fixing others. ▪ To ignore minor dependencies between components. ▪ To ship the same (in absence of QA, or release pressure). Imagine this with multi developers, and modules in medium/large scale projects. 12
  • 13. CD : Delivery vs Deployment 13 Image Source: https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment
  • 15. External Tools • Not a part of your repo / git hosting service. • New subscription ($$) • Configure private/internal hosting or on the cloud. • Offer limited free build minutes / concurrency. Examples: Jenkins, CircleCI, TravisCI External vs Internal 15 Internal Tools • Are part of your repo / git hosting service. • No new subscription $$ (mostly). • No need to setup extra server or hosting. • Virtual/Docker runtime + Scripts. Examples: Bitbucket/Gitlab Pipelines, and Github Actions
  • 16. Internal Tools - Advantage ▪ No extra CI server to configure. ▪ No extra subscription to buy. ▪ No extra login/credentials/permissions to manage. ▪ Code / IP is not exposed to external servers, which could be insecure. Specially, CI tool configured on a poorly secured internal servers. Imagine configuring Jenkins, its required plugins, keeping the server live, and secure. 16
  • 17. Internal Tools - Advantage ▪ External tools might required access to all GIT projects, which an enterprise might not want to expose to a 3rd party CI. ▪ Just commit a XML/YML config file for enabling CI/CD in any repo. ▪ Git repo auto starts Docker image, and runs the script. ▪ CI results, permissions are well integrated in the repo only. ▪ Bottom Line: Pipelines and internal CI tools are very good for small/medium projects, with quick build times and not huge 17
  • 19. Scratch Orgs Before we move ahead CI/CD with Scratch orgs and SFDX is quite powerful, yet simple! i.e. • Create scratch org (quickly) • Push code (quickly again) • Run all tests (Integration checked) • Create packages (Release) – optional. • Dispose/delete the scratch org to give a clean slate for next time. All this could be done automatically via a simple shell script. 19
  • 21. Bitbucket + SFDX https://github.com/forcedotcom/sfdx-bitbucket-package ^ Above open source repo from Salesforce is well documented example. It clearly shows: ▪ How to setup connected apps. ▪ Using JWT grants via SFDX for automated/headless authentication. ▪ A functional bitbucket-pipelines.yml file, with all CI/CD steps. ▪ It shouldn’t take more than 15-20 mins to configure all of the steps mentioned in the README. 21
  • 22. Bitbucket Script's key SFDX commands - sfdx force:org:create: Creates new scratch org - sfdx force:source:push : Pushes source code in the scratch org - sfdx force:apex:test:run : Executes Apex test cases - sfdx force:org:delete: Deletes the scratch org Optional / Additional Steps - sfdx force:package:version:create: Creates a new package - sfdx force:package:install: Installs a given package into an org. - sfdx force:apex:test:run - sfdx force:org:delete 22
  • 23. Before we get too excited 23 Edition Active Scratch Org Allocation Daily Scratch Org Allocation Developer Edition or trial 3 6 Enterprise Edition 40 80 Unlimited Edition 100 200 Performance Edition 100 200
  • 24. Practical CI/CD ▪ Plan CI/CD based on - availability of scratch orgs on daily basis. - build minutes available with your pricing plan. ▪ It’s quite easy to overdo CI, if applied to all branches. ▪ Imagine, scratch orgs getting created on commit in any branch. ▪ Add unit testing code in key release branches, like TEST, QA, UAT. Avoid it in hotfix, feature etc. 24
  • 25. Tuning script at branch level 25
  • 26. GitHub Users ▪ Watch out GitHub Actions. ▪ Currently in BETA, with invite only access. ▪ They are quite powerful and advanced CI/CD solutions. ▪ Probably best of the cult. ▪ Schedule vs Events. ▪ Steps, Actions, Tasks and much more https://help.github.com/en/articles/about-github-actions 26
  • 27. References • Salesforce Bitbucket CI/CD Sample Repo: - https://github.com/forcedotcom/sfdx-bitbucket-package • Atlassian Blog on CI/CD - https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment • Trailheads - https://trailhead.salesforce.com/en/content/learn/modules/git-and-git-hub-basics - https://trailhead.salesforce.com/en/content/learn/modules/sfdx_app_dev - https://trailhead.salesforce.com/en/content/learn/modules/sfdx_travis_ci 27
  • 28. Thanks! Any questions? You can find me at ▪ @abhinavguptas ▪ abhinav@concret.io 28