This build is using a number of advanced features of CircleCI to make the CI pipeline a bit more manageable, most notably dynamic config1.
Dynamic configuration allows us to do some logic at the beginning of a build to determine what parts of the pipeline to trigger.
There is a small circleci.yml file that uses CircleCI's "continuation"
support along with a python scripts to check which parts of the codebase
have been modified, and then sets parameters to be used in a sub-workflow.
The real workflow config file is generated dynamically based on the parameters set and user provided properties. For backward compatibility we have kept the workflows logics (such as filters) similar to before.
Each of the workflows in the "main" config then uses a when: field
referencing various trigger-* parameters to enable or disable them.
The user has ability to modify the build path by
-
using git commit:
-
You can use the following keywords to enable build path(s)
Keyword Description #smoke Enable smoke tests #smoke-flaky Enable flaky smoke tests #integration Enable integration tests #rpm Enable rpm jobs #deb Enable debian package jobs #oci Enable oci jobs #doc Enable doc job #ui Enable ui job -
process_generate.pyscript attempts to detect and enable corresponding jobs automatically if incoming changes contains changes to:- "IT.java" or "Test.java" files
- "docs" or "ui" folder
- "opennms-container" folder
-
-
using
build-triggers.override.jsonfile- rename
example-build-triggers.override.jsontobuild-triggers.override.json - Modify
build-triggers.override.jsonand enable the jobs you want to run by setting them to True
Note: When you enable a job(or workflow), we will enable their dependencies automatically.
- rename
Workflows information is stored in workflows_v2.json file located under main/workflows folder.
This file is broken down into bundles and individual sections.
bundlesection allows for creating workflow(s) that contain of a set ofindividualjob.individualsection allows for defining a job and it's dependencies and filters
The names of bundle or individual are used in the generate_main.py file located under pyscripts folder.
Note: There is a close relationship between properties defined in example-build-triggers.override.json and the logic used in generate_main.py.
The keywords used in detecting which workflow to run from a git commit message is defined in process_generate.py file located under pyscripts folder.
See Readme file under smoke-test folder.