folioCiQualityGates Jenkins Pipeline
General information
The automated Jenkins job we introduce here serves a pivotal role in our software development workflow. Designed to enhance code quality assessment and continuous improvement, this job harnesses the power of SCM polling to vigilantly monitor updates within our source code management system. for the platform-complete repository. .
At its core, this Jenkins job is a proactive gatekeeper, perpetually on the lookout for changes in our codebase. When it detects modifications, it swiftly initiates a harmonious symphony of parallel processes, executing three distinct quality verification jobs: Karate tests, Cypress tests, and schema comparison.
The purpose of this Jenkins job is clear: to maximize code quality by promptly identifying and rectifying any issues or deviations in our codebase. With the capabilities of SCM polling and parallel job execution, we are empowered to maintain the highest standards of software excellence, ensuring that every change contributes to the continuous enhancement of our projects
Include Jobs
- Karate Tests
- Cypress Tests
- Schema Comparison
Job Structure
Stages:
- Init - For the Initialisation purpose
- Check Changes
Parallel Quality Gate Stages. [Run Cypress Tests, Run Karate Tests, Run Schema Comparison]
Check Change Stage Purpose:
The primary purpose of the "Check Changes" stage is to manage the monitoring and assessment of changes within our snapshot branch in platform-complete repository. It operates as follows:
- Initial Commit Capture: In its first run, the stage captures and records the latest commit hash from the snapshot branch. This commit hash is stored securely in AWS SSM (AWS Systems Manager) Parameter Store. -
- Subsequent Change Detection: In subsequent runs, the stage actively compares the previously stored commit hash with the latest commit hash in the snapshot branch.
- Quality Assessment Decision: The comparison results in one of two key outcomes:
- No Changes Detected: If the stored commit hash and the latest commit hash match, it signifies that no changes have occurred in the snapshot branch between job run intervals. In this case, the pipeline intelligently bypasses further steps, as there is no need for retesting.
- Changes Detected: If the commit hashes differ, indicating changes in the snapshot branch, the stage initiates an automatic trigger for parallel execution of three distinct jobs. These jobs, including "Run Karate Tests," "Run Cypress Tests," and "Run Schema Comparison," are executed to thoroughly assess and test the changes made
Run folioCiQualityGate Job
Jobs Link: https://jenkins-aws.indexdata.com/job/folioRancher/job/folioQualityGates/job/folioCiQualityGates/
Jobs Parameter:
- SKIP_CHANGES. - [bool] - by default FALSE
- BRANCH - [string]
Manual Execution with SKIP_CHANGES:
- It provides flexibility for manual execution by recognising the SKIP_CHANGES parameter. When set to true, it enables the direct execution of quality assessment jobs without evaluating commit hash changes.
1 - When Job Executed Automatically By Cron :
SKIP_CHANGES value Default - FALSE
commit hash change Detected. - TRUE
Automatically Triggered Parallel Jobs For the Quality Check
2- When Job Executed Automatically By Cron :
SKIP_CHANGES value Default - FALSE
commit hash change Detected. - FALSE
Parallel Jobs Not Triggered Because There is no Change Between previous and last run
3 - Manually Executed:
SKIP_CHANGES value - TRUE. : Avoiding Hash Check
Parallel Quality Jobs Triggered