Skip to main content

Atomated Deployment using pipeline Benefits.



           
·         Retrieve All components and automatically commit it in branch using package.xml.
·         Validate components in branch by every commit or specified commit by one click, without installing any software.
·         No need to install any software in local machine.
·         No need of technical knowledge.
·         You can see the validation in target org deployment history.
·         You can manage pipeline history for tracking.
·         Immediately correct deployment issue when committing in branch, this will reduce deployment timings.
·         Execute test classes in target environment with one click.
·         Can run multSiple pipeline at a time (e.g validating test classes and retrieving folder).

PipeLine Configuration for project


·         Files Structure in Bitbucket Repository. Find all files and folder structure in below repository. Refer below point for configuration.

·         Paste jar file in you git repository Main folder from ‘Pipeline-Demo’ Repository.

·         Update Build.xml file.  

·         Add build.xml file in root folder of your repository from ‘Pipeline-Demo’ Repository.

·         Create Environment variable.
§  Go to Repository from you web account, for which you want to enable pipeline.
§  Click on ‘settings’ tab.
§  Click ‘Evnironment Variables’ link.
§  In Variable text box give name as ‘BB_PASS’ and give your bitbucket account password in value text box , check ‘secured’ checkbox.
§  Click on ADD button.
§  ADD another variable. In variable test box give name as ‘BB_USERNAME’ and give your bitbucket account username in value text box.
§  ADD another variable. In variable test box give name as ‘SOURCE_URL’ and give your source environment url (https://test.salesforce.com ) from which you want to retrieve components in value text box.
§  ADD another variable. In variable test box give name as ‘SOURCE_USERNAME’ and give your source environment username from which you want to retrieve components in value text box.
§  ADD another variable. In Variable text box give name as ‘SOURCE_PASSWORD’ and give your source environment password from which you want to retrieve components in value text box , check ‘secured’ checkbox.
§  ADD another variable. In variable test box give name as ‘TARGET_URL’ and give your target environment url (https://test.salesforce.com ) in which you want to validate components in value text box.
§  ADD another variable. In variable test box give name as ‘TARGET_USERNAME’ and give your source environment username from which you want to retrieve components in value text box.
§  ADD another variable. In Variable text box give name as ‘TARGET_PASSWORD’ and give your source environment password from which you want to retrieve components in value text box , check ‘secured’ checkbox.

·         Enable Pipeline for repository.
·         Go to Repository from you web account, for which you want to enable pipeline.
·         Click on ‘pipelines’ tab, and enable pipeline.
·         Replace pipeline.yml script with ‘pipeline’yml’ file from ‘Pipeline-Demo’ Repository, and commit it.

·         Run Pipeline for commits.
·         For retrieving components.
·   This is applicable for stable environment only from which you want to retrieve components, because it will retrieve full components which are mentioned in package.xml.
·         To retrieve components commit package.xml in you root folder.
·         Go to the commit from web application.
·         Click on ‘Run Pipeline’ link.
·         Select ‘retrieving components’ pipeline and click ‘Run’ button.
·         After successful completion of pipeline, you must have got new commit of all components in ‘Retrieve’ folder. Please verify.
·         For validating retrieved folder in previous step.
·   Go to the latest commit from your bitbucket web app.
·   Click on ‘Run Pipeline’ button.
·   Select ‘validateRetrieveFolder’ pipeline and click on ‘Run’ button.
·   It will show you error if pipeline fails or it will show successful completion status.
·   It pipeline fails, you can edit and commit the components accordingly in ‘Retrieve’ folder and again try to execute above step.
·         For validating manual or delta commit.
·   To validate you repository after some commits, Go to the latest commits from bitbucket web app.
·   Click on ‘Run Pipeline’ Button.
·   Select ‘deployCheck’ pipeline and click on ‘Run’ button.
·   This will validate full folder mention in script.
·   It will show you error if pipeline fails or it will show successful completion status.
·   It pipeline fails, you can edit and commit the components accordingly in same folder and again try to execute above step.
·         Executing test classes in target environment.
·   Create new folder in root repository with name ‘testexecution’.
·   Add blank package.xml file in that folder. Refer below.
·   Go to the latest commit in bitbucket.
·   Click on ‘Run Pipeline’ Button.
·   Select ‘ExecuteTestClasses’ pipeline and click on Run button.
·   It will show you error if pipeline fails or it will show successful completion status.
·         NOTE:
·   You need to update variables in ‘pipeline.yml’ file. You need to update variable for every target for ‘Dusername’, ‘Dpassword’ and ‘Dservelurl’ as per your requirement.




Comments

Popular posts from this blog

Salesforce lightning component e.force:navigateToURL

This article will explain how to use ‘e.force:navigateToURL’ lightning component to navigate the system to any URL (visualforce page, record, any custom URL). Syntax of ‘e.force:navigateToURL’ var urlEvent = $A.get("e.force:navigateToURL");         urlEvent.setParams({           "url": "/" + recordId ,             "isredirect": "true"         });         urlEvent.fire(); Description of the parameters, 1.        URl – Set this parameter to the required URL that you want to redirect, in this example ‘recordId’ is my variable with has the Id of the record I want to redirect. We can use static URL (e.g https://www.salesforce.com ) as well. 2.        Isredirect – This is optional, this flag will not...

Best practices for Data Loading in Salesforce

Data loading is a very common requirement in most of the salesforce projects. We need to load many master data and transactional data in production based on requirements that include thousands of records. In this article, I am going to list some best practices that we can follow and keep in mind while loading data in production. 1.     Organization-Wide Sharing defaults - While loading data in production, if objects have ‘Private’ OWD then it does additional processing in the background. Therefore, it is better to load data using read/write OWD and change it to ‘private’ after cutover. 2.     Workflow rules, validation rules, and triggers - If these tools are enabled in your production org while loading data, it can give many errors and it may slow down the process. Therefore, it is recommended to disable these tools before loading data.   3.     Bulk API Vs. SOAP API - SOAP API is useful for small data sets where...

How to start with salesforce

'Salesforce' is cloud computing company, which provides many services and uses many technology to deliver services. Salesforce is high demanding cloud computing technology that provides 'PAAS' to create your application on cloud and deliver to users.  But how to start with salesforce. This article will provide you basic idea to start with Salesforce if you are new to this technology.  If you are a developer, it will be very easy to jump in Salesforce technology and master it. How Salesforce is useful to deliver solution: Salesforce platform will help you to deliver CRM Applications. You can build CRM applications which can be used by businesses to track sales activity. Salesforce Platform is employed across all industries to build and launch game changing apps for every department in a company, including HR, IT, operations, finance, legal, and marketing.  Here is the example of some applications that you can build with help of salesforce. ...