SlideShare una empresa de Scribd logo
1 de 39
CI - SFDX + Bitbucket Pipelines
Secure, Simplified and Economical CI
Sat śrī akāl & Namaste
● Abhinav Gupta
● Salesforce MVP (8x) & Architect
● CEO & Founder of concret.io (Salesforce PDO
& ISV Partner)
● I can still code very well, and quite passionate
about it.
● Started with Java in 2004, Salesforce journey
started in 2008.
twitter : @abhinavguptas
Agenda
● What is CI ?
● Why CI?
● Blockers
● Various CI Tools
● Cost Comparison
● Deep Dive into Bitbucket Pipelines
● Bitbucket Tips
CI - “Ki Raula Payea Ehna”?
Why so much noise about it?
Continuous Integration (CI)
● Best Practice
● Central Repo for code/metadata is only “source of truth”.
● All code from each developer resides in that repo.
● Automated Builds to ensure early discovery of bugs/issues.
Still Why - Continuous Integration (CI) ?
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.
What’s biggest blocker?
In getting successful with CI.
I don’t know CI, GIT etc.
I don’t care about this.
Quality of Automated Tests
Bad Test Case Example
Just for sake of code coverage.
With no assertions of
attributes being correctly
populated in the result.
! Big CI failure !
Even best CI tool can’t help with such quality of test
cases.
● Check intentions to write good quality test cases
● Create positive and negative scenarios
● Try following TDD (Test Driven Development) - OPTIONAL
● We all know Apex could be tested via unit tests.
● Aura and LWC can also be unit tested via Jest, Jasmine, Mocha etc. - OPTIONAL
Good news - Not just Apex, but Aura/LWC unit tests can be auto executed in CI env.
CI Prerequisites for Salesforce
Various CI Tools
External Tools
● Are not part of your repo / git hosting service.
● Setup private/internal hosting, or configure
hosted solution subscriptions.
● Offer limited free build minutes /
concurrency.
● Examples:
○ Jenkins
○ CircleCI
○ TravisCI
Internal Tools
● Offered as part of your repo / git hosting
service.
● No need to setup extra server or hosting.
● No new subscription $$ (most of the times).
● Examples:
○ Bitbucket Pipelines
○ GitLab Pipelines
Quick Cost Comparison
As per pricing details listed 20th July 2019
External CI Tools - Circle CI Costing
https://circleci.com/pricing/
External CI Tools - Travis CI Costing
https://travis-ci.com/plans
Internal CI Tools - Bitbucket Costing
https://bitbucket.org/product/pricing
Internal CI Tools - GitLab Costing
https://about.gitlab.com/pricing/
My preference
Internal CI Tools is my preference for many reason like
- No more extra CI server to configure and worry about.
- No extra subscription to buy and manage.
- No app switching.
- Code / IP is not exposed to external servers, which could be insecure. Specially, CI
tool configured on a poorly secured internal servers.
- Over exposure to all GIT projects, which one might not want to expose to CI.
- One just needs to commit a XML config file for enabling CI.
- 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 projects, with quick
build times and not huge Processing/RAM requirements.
Deep Dive Bitbucket Pipelines
Exploring some key areas, and how tos.
CI - Skills Checklist
● 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.
○ It’s not must, but helps a lot
● Attitude
○ Towards writing good tests, and investing some time in grooming these skills.
Typical CI Flow
Simple CI for starting up
● Code/metadata pushed to a target branch.
● CI System/Bitbucket executes the CI Scripting file, which typically
○ Create new scratch org.
○ Push all the code/metadata to new scratch org.
○ Run tests
○ Deletes the same scratch org.
○ It Optionally
■ Create new package version, attempt install of the package in new scratch org
■ Run tests to ensure stability of the same
Setting up Bitbucket Pipelines for Salesforce (via 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 complete bitbucket-pipelines.yml file, which covers all the steps mentioned in the
previous slide.
It shouldn’t take more than 15-20 mins to configure all of the steps mentioned in the
README.
Careful - About Scratch Org Limits
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
● It’s quite easy to get super excited about CI
and scratch orgs.
● Before planning a CI flow of your fantasy,
please check the table on the right >
● If your customer/partner is not having
enterprise edition org, you need to check
○ Number of developers in team.
○ Frequency of spinning new scratch orgs
in team for hotfixes, bugs and features.
○ CI enabled branches, where auto
scratch org creation will happen, and
what is the frequency.
Purposeful & Sensible CI
● We saw limits on number of scratch orgs one can spin on daily basis.
● It’s quite easy to overdo CI, if applied to all branches.
● Imagine, scratch orgs getting created on commit in any branch.
● It might not be helpful and easily burnup the scratch org limits.
● Add unit testing code in key release branches, like TEST, QA, UAT. Avoid it in hotfix, feature etc.
Purposeful & Sensible CI
Sample script showing feature branches ignored for Auto test runs, and scratch org creation.
pipelines:
default:
- step:
script:
- echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
branches:
master:
- step:
script:
- sfdx force:org:create --targetdevhubusername HubOrg --setdefaultusername --definitionfile config/project-scratch-def.json --
setalias ciorg --wait 10 --durationdays 1
- sfdx force:org:display --targetusername ciorg
#Push source to scratch org
- sfdx force:source:push --targetusername ciorg
#Run unit tests on scratch org
- sfdx force:apex:test:run --targetusername ciorg --wait 10 --resultformat tap --codecoverage --testlevel $TESTLEVEL
#Delete scratch org
- sfdx force:org:delete --targetusername ciorg --noprompt
feature/*:
- step:
script:
- echo "Avoid anything scratch org stuff on feature/* pattern."
Some Bitbucket Tips
Branch Permissions
- Keep feature and other dev
branches open for all.
- Lock WRITE access to sensitive and
final branches like UAT/Prod to a
few responsible engineers.
- They should code review and make
sure no junk is coming in.
- It’s good to document and agree on
a branching model in the team.
- Bitbucket helps with that, by clearly
defining feature, hotfix, bugfix and
release branches.
Branching Model
- How nice it will be to auto assign reviewers on pull requests. (pic below)
Default Reviewers
- REPO variables are used in CI scripting to access various normal and
sensitive data. Bitbucket allows easy masking of sensitive information. Just
check the “Secured” option when adding the variables.
Safe Repo Variables
More control on security
“Deployments” feature allows one to
- Tag env as Test, Staging and Prod
- Have clear separation of env
variables for each of them. Which
are only editable by configured
admins.
- Fine permission control on which
branches, people can deploy to that
env.
Integrations
Allows Bitbucket to talk to your Bug
Tracking or Build System.
This option gives you ready made scripts
to integrate with your Bug tracking or
build tracking system.
Mostly requires copying some API keys
etc and setting up the env. Variable.
Slack / Chat Alerts
It’s no code, a simple OAuth with Slack
will take it forward >
Salesforce example uses
Docker based pipelines
config file. If your
organisation works on
Java, Python and other
language, variety of
sample pipeline config
files are available, which
work easily on gradle,
maven etc.
Multi Language Templates
Thanks
Q & A
● Official Salesforce Repo for Bitbucket Pipelines
○ https://github.com/forcedotcom/sfdx-bitbucket-package
● Continuous Integration with Salesforce DX
○ https://developer.salesforce.com/blogs/2019/05/continuous-integration-with-salesforce-dx.html
● Trailhead
○ https://trailhead.salesforce.com/en/content/learn/modules/sfdx_travis_ci
○ https://trailhead.salesforce.com/en/content/learn/modules/heroku-flow/learn-about-continuous-integration-deployment-
and-delivery
References

Más contenido relacionado

La actualidad más candente

DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...Simplilearn
 
Release Management
Release Management Release Management
Release Management Vyom Labs
 
Agile Transformation Explained
Agile Transformation ExplainedAgile Transformation Explained
Agile Transformation ExplainedLeadingAgile
 
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...Simplilearn
 
Learn from the Experts: Using DORA Metrics to Accelerate Value Stream Flow
Learn from the Experts: Using DORA Metrics to Accelerate Value Stream FlowLearn from the Experts: Using DORA Metrics to Accelerate Value Stream Flow
Learn from the Experts: Using DORA Metrics to Accelerate Value Stream FlowDevOps.com
 
Salesforce apex hours azure dev ops
Salesforce apex hours   azure dev opsSalesforce apex hours   azure dev ops
Salesforce apex hours azure dev opsAmit Singh
 
Discover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automationsDiscover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automationsJackGuo20
 
Salesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for DeploymentSalesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for DeploymentSalesforce Developers
 
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 JourneyDevOps.com
 
Achieving Elite and High Performance DevOps Using DORA Metrics
Achieving Elite and High Performance DevOps Using DORA MetricsAchieving Elite and High Performance DevOps Using DORA Metrics
Achieving Elite and High Performance DevOps Using DORA MetricsAggregage
 
Salesforce Architecture framework, Martin Kona
Salesforce Architecture framework, Martin KonaSalesforce Architecture framework, Martin Kona
Salesforce Architecture framework, Martin KonaCzechDreamin
 
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | EdurekaDevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | EdurekaEdureka!
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCDCloudOps2005
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference ArchitecturesSonatype
 

La actualidad más candente (20)

DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
Release management introduction v1.0 tj
Release management introduction v1.0 tjRelease management introduction v1.0 tj
Release management introduction v1.0 tj
 
Best practices in release management
Best  practices in release managementBest  practices in release management
Best practices in release management
 
Release Management
Release Management Release Management
Release Management
 
Agile Transformation Explained
Agile Transformation ExplainedAgile Transformation Explained
Agile Transformation Explained
 
DevOps and Tools
DevOps and ToolsDevOps and Tools
DevOps and Tools
 
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
 
Learn from the Experts: Using DORA Metrics to Accelerate Value Stream Flow
Learn from the Experts: Using DORA Metrics to Accelerate Value Stream FlowLearn from the Experts: Using DORA Metrics to Accelerate Value Stream Flow
Learn from the Experts: Using DORA Metrics to Accelerate Value Stream Flow
 
Salesforce apex hours azure dev ops
Salesforce apex hours   azure dev opsSalesforce apex hours   azure dev ops
Salesforce apex hours azure dev ops
 
Discover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automationsDiscover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automations
 
Salesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for DeploymentSalesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for Deployment
 
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
 
Extreme Programming ppt
Extreme Programming pptExtreme Programming ppt
Extreme Programming ppt
 
Achieving Elite and High Performance DevOps Using DORA Metrics
Achieving Elite and High Performance DevOps Using DORA MetricsAchieving Elite and High Performance DevOps Using DORA Metrics
Achieving Elite and High Performance DevOps Using DORA Metrics
 
Salesforce Architecture framework, Martin Kona
Salesforce Architecture framework, Martin KonaSalesforce Architecture framework, Martin Kona
Salesforce Architecture framework, Martin Kona
 
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | EdurekaDevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
 
Azure DevOps
Azure DevOpsAzure DevOps
Azure DevOps
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 

Similar a Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines

Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - SydneySimplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - SydneyAbhinav Gupta
 
Jenkins workflows and Best Practices
Jenkins workflows and Best PracticesJenkins workflows and Best Practices
Jenkins workflows and Best PracticesKenichi Shibata
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcityMd Jawed
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsLinards Liep
 
Developer 1: Workflows And Code Management
Developer 1: Workflows And Code ManagementDeveloper 1: Workflows And Code Management
Developer 1: Workflows And Code ManagementInflectra
 
Configuration Management and Deployment
Configuration Management and DeploymentConfiguration Management and Deployment
Configuration Management and DeploymentSomnathMore3
 
Designing a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd productsDesigning a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd productsJulian Mazzitelli
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 
from 0 to continuous delivery in 30 minutes
from 0 to continuous delivery in 30 minutesfrom 0 to continuous delivery in 30 minutes
from 0 to continuous delivery in 30 minutesAgileSparks
 
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
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOpsEklove Mohan
 
Optimize Your Enterprise Git Webinar
Optimize Your Enterprise Git WebinarOptimize Your Enterprise Git Webinar
Optimize Your Enterprise Git WebinarCollabNet
 
Serverless java
Serverless   javaServerless   java
Serverless javaVishwas N
 
Introduction to TM1 TurboIntegrator Debugger Webinar - Quebit Consulting
Introduction to TM1 TurboIntegrator Debugger Webinar - Quebit ConsultingIntroduction to TM1 TurboIntegrator Debugger Webinar - Quebit Consulting
Introduction to TM1 TurboIntegrator Debugger Webinar - Quebit ConsultingQueBIT Consulting
 
Implementing Continuous Integration to Improve Software Quality
Implementing Continuous Integration to Improve Software QualityImplementing Continuous Integration to Improve Software Quality
Implementing Continuous Integration to Improve Software QualityRocket Software
 
Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Daniel Bryant
 

Similar a Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines (20)

Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - SydneySimplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
 
Jenkins workflows and Best Practices
Jenkins workflows and Best PracticesJenkins workflows and Best Practices
Jenkins workflows and Best Practices
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepins
 
Developer 1: Workflows And Code Management
Developer 1: Workflows And Code ManagementDeveloper 1: Workflows And Code Management
Developer 1: Workflows And Code Management
 
Configuration Management and Deployment
Configuration Management and DeploymentConfiguration Management and Deployment
Configuration Management and Deployment
 
Designing a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd productsDesigning a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd products
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
from 0 to continuous delivery in 30 minutes
from 0 to continuous delivery in 30 minutesfrom 0 to continuous delivery in 30 minutes
from 0 to continuous delivery in 30 minutes
 
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...
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Optimize Your Enterprise Git Webinar
Optimize Your Enterprise Git WebinarOptimize Your Enterprise Git Webinar
Optimize Your Enterprise Git Webinar
 
CI/CD with Bitbucket pipelines
CI/CD with Bitbucket pipelinesCI/CD with Bitbucket pipelines
CI/CD with Bitbucket pipelines
 
Serverless java
Serverless   javaServerless   java
Serverless java
 
Azure CICD - Day1.pptx
Azure CICD - Day1.pptxAzure CICD - Day1.pptx
Azure CICD - Day1.pptx
 
Introduction to TM1 TurboIntegrator Debugger Webinar - Quebit Consulting
Introduction to TM1 TurboIntegrator Debugger Webinar - Quebit ConsultingIntroduction to TM1 TurboIntegrator Debugger Webinar - Quebit Consulting
Introduction to TM1 TurboIntegrator Debugger Webinar - Quebit Consulting
 
Implementing Continuous Integration to Improve Software Quality
Implementing Continuous Integration to Improve Software QualityImplementing Continuous Integration to Improve Software Quality
Implementing Continuous Integration to Improve Software Quality
 
Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"Velocity NY 2018 "The Cloud Native Developer Workflow"
Velocity NY 2018 "The Cloud Native Developer Workflow"
 

Más de 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 RecapAbhinav 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 MaskAbhinav 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).pdfAbhinav 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.pdfAbhinav Gupta
 
NFT Collectors - Understanding AI Puke Art
NFT Collectors - Understanding AI Puke ArtNFT Collectors - Understanding AI Puke Art
NFT Collectors - Understanding AI Puke ArtAbhinav 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 SideAbhinav 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 PandemicAbhinav Gupta
 
Salesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min SummarySalesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min SummaryAbhinav Gupta
 
Building a layoff proof career
Building a layoff proof careerBuilding a layoff proof career
Building a layoff proof careerAbhinav Gupta
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & SalesforceAbhinav 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 pagesAbhinav 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 SalesforceAbhinav Gupta
 
Learning salesforce-mobile-way
Learning salesforce-mobile-wayLearning salesforce-mobile-way
Learning salesforce-mobile-wayAbhinav Gupta
 
Parsing XML & JSON in Apex
Parsing XML & JSON in ApexParsing XML & JSON in Apex
Parsing XML & JSON in ApexAbhinav Gupta
 

Más de 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
 

Último

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Último (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines

  • 1. CI - SFDX + Bitbucket Pipelines Secure, Simplified and Economical CI
  • 2. Sat śrī akāl & Namaste ● Abhinav Gupta ● Salesforce MVP (8x) & Architect ● CEO & Founder of concret.io (Salesforce PDO & ISV Partner) ● I can still code very well, and quite passionate about it. ● Started with Java in 2004, Salesforce journey started in 2008. twitter : @abhinavguptas
  • 3. Agenda ● What is CI ? ● Why CI? ● Blockers ● Various CI Tools ● Cost Comparison ● Deep Dive into Bitbucket Pipelines ● Bitbucket Tips
  • 4. CI - “Ki Raula Payea Ehna”? Why so much noise about it?
  • 5. Continuous Integration (CI) ● Best Practice ● Central Repo for code/metadata is only “source of truth”. ● All code from each developer resides in that repo. ● Automated Builds to ensure early discovery of bugs/issues.
  • 6. Still Why - Continuous Integration (CI) ? 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.
  • 7. What’s biggest blocker? In getting successful with CI.
  • 8. I don’t know CI, GIT etc.
  • 9. I don’t care about this.
  • 11. Bad Test Case Example Just for sake of code coverage. With no assertions of attributes being correctly populated in the result.
  • 12. ! Big CI failure ! Even best CI tool can’t help with such quality of test cases.
  • 13. ● Check intentions to write good quality test cases ● Create positive and negative scenarios ● Try following TDD (Test Driven Development) - OPTIONAL ● We all know Apex could be tested via unit tests. ● Aura and LWC can also be unit tested via Jest, Jasmine, Mocha etc. - OPTIONAL Good news - Not just Apex, but Aura/LWC unit tests can be auto executed in CI env. CI Prerequisites for Salesforce
  • 14. Various CI Tools External Tools ● Are not part of your repo / git hosting service. ● Setup private/internal hosting, or configure hosted solution subscriptions. ● Offer limited free build minutes / concurrency. ● Examples: ○ Jenkins ○ CircleCI ○ TravisCI Internal Tools ● Offered as part of your repo / git hosting service. ● No need to setup extra server or hosting. ● No new subscription $$ (most of the times). ● Examples: ○ Bitbucket Pipelines ○ GitLab Pipelines
  • 15. Quick Cost Comparison As per pricing details listed 20th July 2019
  • 16. External CI Tools - Circle CI Costing https://circleci.com/pricing/
  • 17. External CI Tools - Travis CI Costing https://travis-ci.com/plans
  • 18. Internal CI Tools - Bitbucket Costing https://bitbucket.org/product/pricing
  • 19. Internal CI Tools - GitLab Costing https://about.gitlab.com/pricing/
  • 20. My preference Internal CI Tools is my preference for many reason like - No more extra CI server to configure and worry about. - No extra subscription to buy and manage. - No app switching. - Code / IP is not exposed to external servers, which could be insecure. Specially, CI tool configured on a poorly secured internal servers. - Over exposure to all GIT projects, which one might not want to expose to CI. - One just needs to commit a XML config file for enabling CI. - 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 projects, with quick build times and not huge Processing/RAM requirements.
  • 21. Deep Dive Bitbucket Pipelines Exploring some key areas, and how tos.
  • 22. CI - Skills Checklist ● 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. ○ It’s not must, but helps a lot ● Attitude ○ Towards writing good tests, and investing some time in grooming these skills.
  • 23. Typical CI Flow Simple CI for starting up ● Code/metadata pushed to a target branch. ● CI System/Bitbucket executes the CI Scripting file, which typically ○ Create new scratch org. ○ Push all the code/metadata to new scratch org. ○ Run tests ○ Deletes the same scratch org. ○ It Optionally ■ Create new package version, attempt install of the package in new scratch org ■ Run tests to ensure stability of the same
  • 24. Setting up Bitbucket Pipelines for Salesforce (via 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 complete bitbucket-pipelines.yml file, which covers all the steps mentioned in the previous slide. It shouldn’t take more than 15-20 mins to configure all of the steps mentioned in the README.
  • 25. Careful - About Scratch Org Limits 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 ● It’s quite easy to get super excited about CI and scratch orgs. ● Before planning a CI flow of your fantasy, please check the table on the right > ● If your customer/partner is not having enterprise edition org, you need to check ○ Number of developers in team. ○ Frequency of spinning new scratch orgs in team for hotfixes, bugs and features. ○ CI enabled branches, where auto scratch org creation will happen, and what is the frequency.
  • 26. Purposeful & Sensible CI ● We saw limits on number of scratch orgs one can spin on daily basis. ● It’s quite easy to overdo CI, if applied to all branches. ● Imagine, scratch orgs getting created on commit in any branch. ● It might not be helpful and easily burnup the scratch org limits. ● Add unit testing code in key release branches, like TEST, QA, UAT. Avoid it in hotfix, feature etc.
  • 27. Purposeful & Sensible CI Sample script showing feature branches ignored for Auto test runs, and scratch org creation. pipelines: default: - step: script: - echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'." branches: master: - step: script: - sfdx force:org:create --targetdevhubusername HubOrg --setdefaultusername --definitionfile config/project-scratch-def.json -- setalias ciorg --wait 10 --durationdays 1 - sfdx force:org:display --targetusername ciorg #Push source to scratch org - sfdx force:source:push --targetusername ciorg #Run unit tests on scratch org - sfdx force:apex:test:run --targetusername ciorg --wait 10 --resultformat tap --codecoverage --testlevel $TESTLEVEL #Delete scratch org - sfdx force:org:delete --targetusername ciorg --noprompt feature/*: - step: script: - echo "Avoid anything scratch org stuff on feature/* pattern."
  • 29. Branch Permissions - Keep feature and other dev branches open for all. - Lock WRITE access to sensitive and final branches like UAT/Prod to a few responsible engineers. - They should code review and make sure no junk is coming in.
  • 30. - It’s good to document and agree on a branching model in the team. - Bitbucket helps with that, by clearly defining feature, hotfix, bugfix and release branches. Branching Model
  • 31. - How nice it will be to auto assign reviewers on pull requests. (pic below) Default Reviewers
  • 32. - REPO variables are used in CI scripting to access various normal and sensitive data. Bitbucket allows easy masking of sensitive information. Just check the “Secured” option when adding the variables. Safe Repo Variables
  • 33. More control on security “Deployments” feature allows one to - Tag env as Test, Staging and Prod - Have clear separation of env variables for each of them. Which are only editable by configured admins. - Fine permission control on which branches, people can deploy to that env.
  • 34. Integrations Allows Bitbucket to talk to your Bug Tracking or Build System. This option gives you ready made scripts to integrate with your Bug tracking or build tracking system. Mostly requires copying some API keys etc and setting up the env. Variable.
  • 35. Slack / Chat Alerts It’s no code, a simple OAuth with Slack will take it forward >
  • 36. Salesforce example uses Docker based pipelines config file. If your organisation works on Java, Python and other language, variety of sample pipeline config files are available, which work easily on gradle, maven etc. Multi Language Templates
  • 38. Q & A
  • 39. ● Official Salesforce Repo for Bitbucket Pipelines ○ https://github.com/forcedotcom/sfdx-bitbucket-package ● Continuous Integration with Salesforce DX ○ https://developer.salesforce.com/blogs/2019/05/continuous-integration-with-salesforce-dx.html ● Trailhead ○ https://trailhead.salesforce.com/en/content/learn/modules/sfdx_travis_ci ○ https://trailhead.salesforce.com/en/content/learn/modules/heroku-flow/learn-about-continuous-integration-deployment- and-delivery References