- 15
- 47 760
Cloud Spark House
India
เข้าร่วมเมื่อ 16 ก.ย. 2019
Salesforce DevOps and other tools, automation channel to help the community. :)
Complete Guide to Azure DevOps for Salesforce from Scratch PART 3
Hi Friends,
This video series will help you in setting up CI/CD DevOps deployment to any Salesforce instance from scratch.
Part 3 contains resolving of common azure-pipeline.yml script error fixes, sfdx command error fixes, Salesforce deployment error fixes and finally code deployment into Salesforce.
Final azure-pipeline.yml file-
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# aka.ms/yaml
pr:
autoCancel: "true"
branches:
include:
- Test
- main
paths:
exclude:
- README.md
- azure-pipelines.yml
stages:
- stage: TestSalesforceOrg
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/Test'))
jobs:
- job: DeployTestOrg
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
checkLatest: true
- bash:
npm install sfdx-cli --global
displayName: Install Salesforce CLI
- bash:
sfdx config:set restDeploy=false --global
displayName: Use SOAP API for Deployment
- bash:
sfdx force:auth:jwt:grant --clientid 3MVG9G9pzCUSkzZtnzxaz29KLNLs4Z1j.SpYGU__P.iugIKMWvC6KKZbUWrZ0Ax7oDfZ__etQmgbGKNZV6xK5 --jwtkeyfile ./bin/server.key --username abhirupsengupta20@gmail.com --instanceurl login.salesforce.com
displayName: Authorize Salesforce DeployTestOrg Org
- bash:
sfdx force:source:deploy -p force-app -w 10 -u abhirupsengupta20@gmail.com
displayName: Deploy source code to DeployTestOrg Org
This video series will help you in setting up CI/CD DevOps deployment to any Salesforce instance from scratch.
Part 3 contains resolving of common azure-pipeline.yml script error fixes, sfdx command error fixes, Salesforce deployment error fixes and finally code deployment into Salesforce.
Final azure-pipeline.yml file-
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# aka.ms/yaml
pr:
autoCancel: "true"
branches:
include:
- Test
- main
paths:
exclude:
- README.md
- azure-pipelines.yml
stages:
- stage: TestSalesforceOrg
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/Test'))
jobs:
- job: DeployTestOrg
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
checkLatest: true
- bash:
npm install sfdx-cli --global
displayName: Install Salesforce CLI
- bash:
sfdx config:set restDeploy=false --global
displayName: Use SOAP API for Deployment
- bash:
sfdx force:auth:jwt:grant --clientid 3MVG9G9pzCUSkzZtnzxaz29KLNLs4Z1j.SpYGU__P.iugIKMWvC6KKZbUWrZ0Ax7oDfZ__etQmgbGKNZV6xK5 --jwtkeyfile ./bin/server.key --username abhirupsengupta20@gmail.com --instanceurl login.salesforce.com
displayName: Authorize Salesforce DeployTestOrg Org
- bash:
sfdx force:source:deploy -p force-app -w 10 -u abhirupsengupta20@gmail.com
displayName: Deploy source code to DeployTestOrg Org
มุมมอง: 4 695
วีดีโอ
Complete Guide to Azure DevOps for Salesforce from Scratch PART 2
มุมมอง 7K2 ปีที่แล้ว
Hi Friends, This video series will help you in setting up CI/CD DevOps deployment to any Salesforce instance from scratch. Part 2 contains creation of Server.crt and server.key file to be used in connected app, how to create conected app in Salesforce, how to write a simple azure-pipeline.yml file. OpenSSL related links and content- Link to OpenSSL video- th-cam.com/video/WW9RpDh5G58/w-d-xo.htm...
Complete Guide to Azure DevOps for Salesforce from Scratch PART 1
มุมมอง 10K2 ปีที่แล้ว
Hi Friends, This video series will help you in setting up CI/CD DevOps deployment to any Salesforce instance from scratch. Part 1 contains creation of new project and repo in Azure, taking an extract of code metadata and having an initial code commit to Azure Git repository. Link to Azure- azure.microsoft.com/en-us/services/devops/ Link to Azure DevOps account creation- th-cam.com/video/JffFTIa...
Azure DevOps Configuration, Overview and Free Account Setup
มุมมอง 4492 ปีที่แล้ว
Hi All, This video will help you understand Azure DevOps and how to get started for free. Link to Azure- azure.microsoft.com/en-us/services/devops/ Thanks. :)
SFDX Deploy from Local to Salesforce Org
มุมมอง 2.7K2 ปีที่แล้ว
Hi All, This video will help in SFDX deployment from your local machine if you don't have CI/CD setup or any repository. a) Download Salesforce CLI- developer.salesforce.com/tools/sfdxcli b) Video to setup VS Code for Salesforce- th-cam.com/video/tpd23pzEBFo/w-d-xo.html&ab_channel=CloudSparkHouse SFDX commands to run in terminal- 1) Run Validation only- sfdx force:source:deploy -p force-app -c ...
How to generate Server Certificate/Server.crt/Server.key
มุมมอง 13K2 ปีที่แล้ว
Hi Guys, This video will help you create a server.crt file from scratch. URL to download OpenSSL- gnuwin32.sourceforge.net/packages/openssl.htm Steps- 1)openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 2)openssl rsa -passin pass:x -in server.pass.key -out server.key 3)set OPENSSL_CONF=C:\openssl\openssl-0.9.8h-1-bin (1)\share\openssl.cnf 4)openssl req -new -key server.key -out ser...
Salesforce SFDX Deployment, Connected App, SFDX Commands
มุมมอง 1.3K3 ปีที่แล้ว
Hi Guys, This video will help you give an overview of what is SFDX, what are the steps to follow to setup a SFDX deployment. Callback URL- localhost:1717/OauthRedirect Retrieve sfdx force:source:retrieve -x manifest/package.xml -u abhirupsengupta20@gmail.com Auth-org sfdx auth:web:login clientid 3MVG9G9pzCUSkzZtnzxaz29KLNIahwI1KYav0RxwikQ1EgMnQ4Z9LNg1rvNB4FqNhoSuq1ovUxewp_7.YlEm0 setdefaultdevh...
VS Code Setup for Salesforce
มุมมอง 2363 ปีที่แล้ว
Hi Guys, This video will help you setup VS Code and how developers can create a VS Code project, autorize an Org and retrieve or deploy their code through SFDX. Important links Install VS Code - code.visualstudio.com/ If this video was helpful please subscribe and share to help the community. :)
SFDX Installation in Windows
มุมมอง 7493 ปีที่แล้ว
Hi Guys, This video will help you in installing SFDX CLI in windows machine. Important links Install SFDX CLI - developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm If this video was helpful please subscribe and share to help the community. :)
Overview of Salesforce Deployment with SFDX
มุมมอง 3743 ปีที่แล้ว
Hi Guys, This video will help you give an overview of what is SFDX, what are the steps to follow to setup a SFDX deployment. Important links 1. Install SFDX CLI - developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm 2. Install VS Code - code.visualstudio.com/ 3. Create Certificate and connected app 4. List of sfdx commands- developer.salesforce.com/doc...
Introduction to Git, GitHub, Cloning and Pushing into Repository
มุมมอง 1213 ปีที่แล้ว
Hi Guys, This video will help you understand what is Git,how to create a repository in GitHub ,clone the repository and commit your changes through local machines. Important links 1) Git download- git-scm.com/downloads 2) GitHub link- github.com/ 3) GitHub desktop download- desktop.github.com/ 4) My Public GitHub repo for your practice(https)- github.com/wazza9037/GitHub_Repo_Cloning.git If thi...
Salesforce Deployments with ANT Jenkins Integration
มุมมอง 4.6K3 ปีที่แล้ว
This video contains a basic overview on how can we integrate Jenkins and ANT to perform CI/CD deployments into Salesforce orgs. I'll be going through the details in this video. All links- My code repository for reference- github.com/wazza9037/ANT_Jenkins_Salesforce.git Link of previous videos- Jenkins installation- th-cam.com/video/mT82BstTPQc/w-d-xo.html&ab_channel=CloudSparkHouse ANT installa...
Jenkins Installation in Windows 10
มุมมอง 3253 ปีที่แล้ว
This video contains a basic overview on how can we install Jenkins in local machines(Windows). I'll be going through the details in this video. All links- www.jenkins.io/download/
Apache ANT Setup in Local Machines
มุมมอง 3263 ปีที่แล้ว
Hi Guys, This video contains a basic overview on how can we can setup Apache ANT in local machines. I'll be going through the details in this video. All links- 1)Ant download site- ant.apache.org/bindownload.cgi 2)Ant installation notes for all platforms- ant.apache.org/manual/install.html 3)My GitHub Public repo- github.com/wazza9037/ANT_Setup.git Setting path variables- set ANT_HOME=D:\DevOps...
SALESFORCE DEPLOYMENT - JENKINS,GIT,ANT(Overview)
มุมมอง 1.8K4 ปีที่แล้ว
Hi Guys, This video contains a basic overview on how can we use Jenkins, Github and Ant to deploy into any Salesforce org. I'll be going through the details and technicalities in the subsequent videos. I don't own any music used in this video. Courtesy goes to www.bensound.com
Wanted how to create .p12 file throughout openssl pkcs12 command
Thanks bro u saved me❤
Happy to help
All the 3 parts are awesome, thanks for sharing this.
Bro getting server.crt: Permission denied while running the 5th command. Please help!!
Hi , sorry to hear that. Did you follow all the previous steps correctly?
Yes, I followed the exact same steps
Thank you once again for this amazing video, it helped a lot. I have a question maybe you can assist: this command is giving an error related to comment but there's no comment on the script command: sf project deploy start -x manifest/package.xml -o $(USERNAME) error: Error (1): Comment is not closed.
Hi, looks like an unusual error. What are you trying to deploy?
100th Like is from me
simple and straight forward, Thanks Brother.
Thank you for watching😊
title says .crt and video shows .csr
Last command converts csr to crt
how to perform delta deployment in azure instead of full deployment
you may look into an open source tool called sgd(Salesforce git delta)
Thank you for this video. Question on the bash - bash: sfdx force:source:deploy -p force-app -w 10 -u $(USERNAME) Will the same work for all future deployment jobs/stages or will I have to remove the fore-app deploy to make it deploy specific components or move specific components that are in the pull request that was raised? Experiencing an error that says Too many files in zip so I'm assuming that it's trying to grab all the files in the force app folder
Hi, this command deploys all the components inside the fore-app folder. You may specify the path or specific component and it will only deploy it. It's a very basic solution in this demo. You may use your own logic to get only the delta changes. 😉
Nice one. Do you train people on Salesforce DevOps??
Hi Austin, unfortunately no. You may comment if you have any doubts.
Thank you for this helpful video. Can I use the same server certificate for prod and non-prod environments?
Thank you for watching the video. Yes you may use if you don't have any security or compliance issues in your organisation.
Thank you for watching the video. Yes you may use if you don't have any security or compliance issues in your organisation.
How about adding pre and post-deployment. Like running a destructive changes?
You may do it manually or you can create a step in the yaml file to run the sf/sfdx command for destructive providing the correct parameters and path .
Great content. Very helpful.
Thank you :)
This was such a useful video, thank you! One question - why did you clone the repo to your local machine twice (once at 4:37 to Git_Demo and again at 14:10 to AzureDemo)? I'm a bit confused on that part.
Hi Whitney. It seems redundant. There is no need to clone twice. It's always good to hear that the video was useful. :)
Thanks a lot man
Np man.
Hi Sir, Can you please help me to transfer only delta data (new changes) instead of all the components again and again from Azure DevOps to Salesforce
hey, glad you reached out. You can use a tool called sgd(Salesforce git delta). Just Google it and try it out
Hi. I received this error. /usr/bin/bash /home/vsts/work/_temp/668bbe5b-e3ba-4efe-8713-f3d77c45bdb4.sh Unsupported Node.js version 14.21.3, version 16.0.0 or later is required. ##[error]Bash exited with code '1'.
At about the 13:20 mark, you entered a user name. What if there are multiple administrators working on deployment?
Hi. I would recommend to have a generic admin user created for deployments for cicd. All deployments will happen against that user as we are using CICD. Hope this helps.
can you upload video, or share the reference ,how you created/configured that app in salesforce,
In my channel, there is a series for Salesforce deployment using azure. There I have used sfdx deployment, which is recommended by Salesforce compared to ant.
Thank you so much! great job! useful information!
Thank you for your feedback 😊
Can we do quick deploy through Azure release pipeline, without running test classes while deploying into prod
Quick deploy only appears once you have validated the code with test runs in Prod. If you want to trigger the quick deploy through Azure once it's validated, then it needs to be investigated if there is any sf commands to do that. But otherwise you can always do a deploy with test runs.
@@cloudsparkhouse6538 thanks I got the sfdx command , how to fetch Deployment id dynamically instead of hardcode
That was really an informative video. Thanks for the sessions. I have a question on what is the purpose of the below code: - bash: sfdx config:set restDeploy=false --global displayName: Use SOAP API for Deployment And also what is the meaning of: pr: autoCancel: "true" Will be eagerly waiting for the answer. Thanks.
These are few config settings. for the 1st one, it is instructing to use SOAP api for deployments. For 2nd one, if there is any pull request merged in that branch, Whether to cancel running PR builds when a new commit lands in the branch. Default: true. Doc: learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pr?view=azure-pipelines#probjectproperties
Really nice vdo
Thank you bro
hi bro ,what is the my error '' 'Unable to load config info from /usr/local/ssl/openssl.cnf'
I guess you need to provide proper path in config file
How to get key?
Key is right there in the end with the certificate. File name- server.key
You're azure-ming? 👍
🤣🤣🤣🤣
hii, can you make video on full setup of Create a Self-Signed SSL Certificate and Private Key in AWS Ubuntu, Create Connected App for JWT-Based Flow and Configure the Jenkins environment Variable in AWS Ubuntu. Pls Bro
Hi, I have a separate video on how to create a server certificate and key and how we can use it in connected apps to connect into Salesforce
@@cloudsparkhouse6538 Continuous Integration Using Jenkins with SalesforceDX | JWT-Based Flow in AWS EC2 Ubuntu
Awesome contact. I was very helpful.
I tried the same thing as mentioned by you. While running the pipeline, my Salesforce Org doesnt seem to authorise in the Authorize Salesforce step. Command Prompt doesnt throw any error and shows successful deployment. But when i check my org, no changes are deployed. I checked the Consumer key, username, loginUrl...its all correct. Can you please help me?
Make sure you user has admin access and your connected app has been given access to admin in profile section. If deployment is successful, did you check the deployment status?
@@cloudsparkhouse6538 Yes Sir. User and connected app has admin access. I looked closely into it and it seems like even the deployment is not done. It just says finishing deployment. After installing the Salesforce cli, I checked the sfdx version, there was no output. Basically , none of the sfdx commands are running.
@@nobodyman5632 I am pretty sure your sfdx is not installed properly. Where are you trying to install it in?
Useless video i ever seen
Its a very informative session, thank you.I have a question why is github and VScode not connected, is there any specific reason, generally when we retreive components they will be automatically taken as changed files in github right, what is the use of copy pasting entire folders.
You can have your git and vs code with Salesforce Authorization in the same folder if you want. I suggest beginners to have them in 2 separate folders to avoid confusion. It's your choice.
how can I do this on Mac
Unfortunately I have not used mac so can't tell.
Hi Thanks for the tutorial.. any possible to create CICD pipeline Salesforce delta through Azure Devops yaml..Thanks in advance please try to do.
Sure, will do it soon.
Thanks, but how i can trust this certificate
I found this in Google- If you want to turn on SSL/TLS trust for that certificate, go to Settings > General > About > Certificate Trust Settings. Under "Enable full trust for root certificates," turn on trust for the certificate.
Is there any way to auhorize an org without certificates?
Through Azure, I'm not aware. Locally if you do in VS code, it usually opens a browser where you login with creds. You have to create a connected app and that connected app needs cert.
Instead of using jwt now you can generate sfdx url for org authentication however certificate would be still required as to generate the url you need to have consumer key and secret.
Hello bro, I am getting the error '/home/vsts/work/1/s/bin/server.key - no such file or directory
probably because the path which you have provided for server.key is incorrect
Hi I getting one issue ERROR running force:source:deploy: sfdx force:source:deploy -p force-app -w 10 -u 'username' This directory does not contain a valid Salesforce DX project when it's reach a deploy stage
Make sure Salesforce cli is installed and it's being run in the place your Salesforce project is created
/usr/bin/bash /home/vsts/work/_temp/34da128e-44c9-483f-b1a9-f228faeac879.sh ERROR running auth:jwt:grant: We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: Error authenticating with JWT. Errors encountered: client identifier invalid client identifier invalid client identifier invalid ##[error]Bash exited with code '1'. Finishing: Authorize Salesforce DeployTestOrg Org
Please check if your consumer key and secret are correct
tq @@cloudsparkhouse6538
First video was amazing...Can you please reshoot next two parts without errors...it will be very helpful for me..
Hey Lakshmi. Thanks for your suggestions. Unfortunately I don't have much time to do so. You may shoot any queries you have.
Sorry if you felt offended...
Thank you so much. Really useful content
Glad to hear that. Thanks for watching.
Can i do the registration of the certificat with a code by the network (LAN network)?
It's better to create a certificate separately and then put it in proper place.
Nice series bro 👌
Thanks bro.
One of the best video I have seen. Could you please explain How you can revert the changes to previous version
In git? If you are using github desktop, go to history tab and right click on any commit and click revert changes in commit.
I have question,In every feature branch where developer will work upon, do the developer need to edit the package.xml and specify his component that he has changed and that needs to be deployed while running the pipeline while merging this feature branch into higher branch?
No there is no need. We are using force source deploy command and have specified a folder called force-app. Anything inside that folder if properly put, will get deployed to the Salesforce org. So developers only need to put the new/updated files of classes/fields etc.
@@cloudsparkhouse6538 When I create a branch for development from main, I get all the files, and I use VSCode to clone the repo. And then commit my changes. So in my dev branch there are all other files along with my modified file. How can I then deploy only modified file without modifying package,xml?
Thank you for the great work on knowledge sharing 😃
Thank you😊
Abhirup bhai .. good video on Azure DevOps .. keep it up
Thanks bro :)
In Azure how to allow multiple team for their deployment!!
You can create different groups in settings, and then in repository access, assign it to different groups
Good Useful!! Getting server.crt: Permission denied
may i know in which stage you are getting this error?
@@cloudsparkhouse6538 openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
@@shyamrl9254 My reply may be useful for anyone who check it now. We need to check the folder permissions in which openssl folder is downloaded. If openssl folder is downloaded in Program Files, then Permission denied error may occurs. download the openssl folder in C:\ drive or any drive which does not need permission and copy the path and do the step 3. It should work. Thanks.
🥳👏👏👏
Thank you😊