- Links:
-
Add .env file to the root folder with the same variable names in env-example file
-
Run Docker Containers:
docker compose up
-
Wait for :
- Jenkins container to print INFO Log : "Jenkins is fully up and running".
- Sonar container to print INFO Log : "SonarQube is up"
-
Go to http://localhost:${JENKINS_PORT}/ & Log in with ${JENKINS_USER} and ${JENKINS_PASS} values you have configured in the .env file
-
Install Plugins & Configure basic Jenkins settings
-
In Dashboard select Manage Jenkins, scroll down to System Configuration, click on Manage Plugins & select Available Tab.
- search for SonarQube Scanner and install it.
- search for Sonar Quality Gates and install it.
- Restart Jenkins after installation.
-
Go back to Manage Jenkins, scroll down to System Configuration & Click on Configur System & update the following :
- Maven Project Configuration set the value of "# of executors" to : 10 (
‼️ You must update this value each time you restart the Jenkins container) - In Git plugin add a global Git user config by setting your "user.name" & "user.email"
- In Shell set the value of "Shell executable" to : /bin/bash
- Click Apply & Save
- Maven Project Configuration set the value of "# of executors" to : 10 (
-
Go back to Manage Jenkins, scroll down to Security, Click on Configure Global Security, scroll down to Authorize JSONP or primitive XPath requests by whitelist & check the box "Allow requests without Referer".
-
-
Configuring Boomi Account
-
Go to Dashboard & Click on the Account_{Rename} folder:
-
Click on configure, update the "accountId" in folder propriety & click Apply & save. (To find your Boomi accountId Log in to your Boomi account and go to Settings » Account Information.)
-
Click on Credentials & update the authToken to the Boomi API Token (Format) [email protected]:bOomi-aPi-ToKen. (How to configure your Boomi API Token? Link1 Link2)
-
-
-
Test Job execution
- Go to Dashboard, click on the Account_{Rename} folder & select the Publish Reports Tab.
- Select List Atoms & click on Build now
- Once the build is compelete refresh the page and select the html report.
-
GIT Advance Settings (There are four jobs that use a GIT Credentials as "git_id")
- Go to Dashboard & click on the Account_{Rename} folder :
-
Select Credentials, under Stores scoped to Account_{Rename} click on the Account_{Rename}, Select Global credentials (unrestricted) folder & click on Add Credentials :
- User name : "Use your git username"
- Password : Past your Git Token. How to generate Git Token?
- ID : git_id
- Click OK
-
Search for all Jobs that have GIT (there should be 4).
- On each job click configure :
- Source Code Management update the Repository URL to point to your GIT repository where the component files will be uploaded.
- Under Post-build Actions add the Branches to push to remote repositories.
- click on *Apply & save.
- On each job click configure :
-
- Go to Dashboard & click on the Account_{Rename} folder :
-
Sonar Advance Settings
-
Test your sonar container Boomi code quality checks:
-
Open sonar container CLI and test the setup by running this command :
sonar-scanner \ -Dsonar.projectKey=BoomiSonar \ -Dsonar.sources=. \ -Dsonar.host.url=http://localhost:9000 \ -Dsonar.login=82e12d4fcdfd583f963e680c63dd85d441c738e8
-
You should have a success INFO log at the end of the execution:
INFO: ------------------------------------------------------------------------ INFO: EXECUTION SUCCESS INFO: ------------------------------------------------------------------------
-
Go to http://localhost:{SONAR_PORT} and Login with :
- login : admin
- password : admin
-
-
Jenkins Settings :
-
Go to Dashboard & Click on the Account_{Rename} folder:
- Click on Credentials & update the sonarToken set the Secret to : 82e12d4fcdfd583f963e680c63dd85d441c738e8
- Click on Configure in Folder Properties look for sonarProjectKey propretie and replace it by SONAR_PROJECT_KEY (
‼️ IMPORTANT do not replace the Value replace the Name)
-
Go back to Dashboard, select Manage Jenkins, scroll down to System Configuration, click on Global Tool Configuration, Scroll down to SonarQube Scanner & Click on Add SonarQube Scanner button:
- Name : SonarQube Scanner Boomi Sonar
- Install from Maven Central : Choose 4.2.0.1873
- Click apply & save
-
Go back to Dashboard, select Manage Jenkins, scroll to System Configuration and click on Configure System :
-
Scroll down to SonarQube servers & Click on Add SonarQube button:
- Name : Boomi Sonar
- Server URL : http://sonar:9000/
-
Scroll down to Quality Gates - Sonarqube & Click on Add Sonar instance button:
- Name : Boomi Sonar
- SonarQube Server URL : http://sonar:9000/
- SonarQube account token : 82e12d4fcdfd583f963e680c63dd85d441c738e8
- Click apply & save
-
-
-
-
You're done!
☺️