- 03 Oct 2022
- 1 Minute to read
- Updated on 03 Oct 2022
- 1 Minute to read
What is Jenkins?
Jenkins is an open-source Continuous Integration server written in Java for orchestrating a chain of actions to achieve the Continuous Integration process in an automated fashion. Jenkins supports the complete development life cycle of software from building, testing, documenting the software, deploying, and other software development life cycle stages.
How to trigger Jenkins job in CI/CD?
Trigger a Jenkins job through CI jobs in AutoRABIT. To do so,
- Go to the New CI Job screen.
- Choose one of the CI Job processes from the below list:
- Deploy SFDX source from Version Control
- Deploy from Salesforce Org
- Deploy from Salesforce Org with a Version Control backup
- Deploy from Version Control
- Install an Unlocked Package from a Version Control Branch
- Go to the Deploy section.
- Select the On Successful Deployment checkbox. This feature allows you to run various jobs once the CI job is successfully deployed.
- Select the Trigger Jenkins Job checkbox. This will trigger Jenkins jobs on successful deployment.
- Fill in the below details:
- In the URL field, enter the full URL of the Jenkins. You can either specify http://localhost:8080 (when connecting from your machine and assuming that you started Jenkins on port 8080) or http://<machine_hostname>:8080 when connecting from anywhere.)
- In the Job Name field, enter the name of the project of the current build. In our example, we're going to name the job e.g. "HelloWorld".
- For the Job URL field, enter the URL path of your project or job (http://<machine_hostname>:8080/<Job URL>/). For example: "job/Helloworld".
- Enter the user credential for whom the job is being triggered in the User ID field.
- Enter the API token key available for your job. Navigate to your Profile > Configure to view your API Token.
- Jenkins has support for the parameterized build as well. Enter the parameter name with the parameter value in this field. To add multiple parameters, click on sign and enter the parameter value.
- Go to your project configuration, then go to the General tab. Select "This project is parameterized".
- Click on Add Parameter. From the list of parameters available, select your desired parameter(s) and enter the required parameter values.
- Click Save. You should now have your parameters passed to Jenkins.