Skip to main content

How to implement CI/CD utility on the example of JET BI’s Advantage project

About Us
Published by jetbi
20 December 2022
100

CI/CD is a utility for Gitlab that is used to scan the project for errors and/or low-quality code, to make the project convenient for deployment on Scratch orgs and easy to configure for use. Checking with the CI/CD pipeline will help you determine what fixes and improvements need to be made to successfully deploy the project to any new org.

Example of CI/CD usage on our project for Advantage application development. The steps below display how to roll out Advantage app code on a new scratch org.

Prerequisites

  • You must deploy your project to Git and all branches should be created on a remote repository.
  • A Jenkins file should be added to the project folder, containing the necessary settings for checking the project through the pipeline.
  • Make sure that you have an available DevHub to create Scratch orgs.

 

1. Prepare a Jenkins file for pipeline configuration

1.1. In your Gitlab open your project, then select CI/CD -> Pipelines -> Run pipeline, then create a new pipeline.

1.2 Pipeline will be run automatically when you commit to any branch of the project. Then the validation process will be started.

ci-cd-1

2. Run the pipeline to check for errors in the project

2.1   First of all, at the “Build” stage, CI checks the project for the presence of all the metadata used. It is necessary that all objects, fields, classes, etc. are specified in. xml files. If you have passed this stage, it means that this project can be successfully deployed in scratch org.

ci-cd-2

2.2   Then your code needs to pass the code quality checking. This check provides the code with a static code analyzer for bad practices and unnecessary elements.

ci-cd-3

2.3   The last check is to run the unit tests. Tests are run as the standard user, without access to the application and all its components. Therefore, tests should be implemented using custom records of the User object and the System.runAs() method. The user must be assigned a permission set that grants access to all the necessary components of the application. If all pipeline checks have been passed, then the project is ready for deployment.

ci-cd-4

3.  Push the project to Scratch org

3.1 Create a new Scratch org using the sfdx-project.json file. For correct project deployment, you need to add a parameter "namespace": "advantage" to this file.

3.2 Use a commanding force:source:push to push the project to Scratch org. If the validation by pipeline was successful, the project will be successfully deployed to the environment.

3.3 You need to configure your user to make this project available for use. Open Setup > Permission Sets, then select 'Advantage administrator' and add the assignment to your user.

ci-cd-5

Perform the same actions for the “Advantage user” permission set. Then you’ll be able to find the Advantage app in the list.

 

As a result of passing the verification, we got a ready-to-use project that can be quickly and easily deployed to any Scratch organization. After installing the project, it is very easy to configure it for use, without additional efforts on user profile and field-level security configuration. The user only needs to create or upload data via Data Loader. This greatly facilitates the project development process across divided organizations.


Aleksandr Zherebilo
Salesforce Developer
image
Question to the expert
image

We have available resources to start working on your project within 5 business days

1 UX Designer

image

1 Admin

image

2 QA engineers

image

1 Consultant

image
Related Articles
All articles
image
How to Customize Salesforce Field Service Mobile for Your Technicians
Salesforce Field Service Mobile provides a standard technician experience that companies can extend to fit their own service processes. This article looks at areas where a custom mobile workflow can help: AI repair assistance, field documentation, external tools, back-office integrations, quotes and payments on site, barcode scanning and role-based mobile layouts. It also outlines four practical steps for planning a mobile workflow around the technician’s work.
21 October 2026
image
Salesforce Field Service Mobile: New Capabilities for Technicians
Salesforce Field Service Mobile continues to evolve with new capabilities for technicians working in the field. Explore how updates to job preparation, mobile forms, voice input, mapping, and Work Order views are changing the technician experience, and learn why configuring these capabilities around your service operations matters.
14 October 2026
image
Closing the Gap Between Field Service and Business Needs
Standard Salesforce Field Service configuration covers many service processes, but individual businesses can have different workflows, working conditions, scheduling rules, and operational requirements. This article looks at three areas where standard configuration can fall short: how technicians work, the conditions of field service operations, and business-specific processes. It also provides a practical checklist of signs that a Salesforce Field Service setup could benefit from customization.
07 October 2026