These are the scripts used to generate test data for the disk throughput testing.
The testing scripts use some common environment variables.
Make a copy of .env.example
to .env
and source it to set the environment variables:
export CBCI_FOLDER_COUNT=50
export CBCI_JOBS_PER_FOLDER=100
export CBCI_OUTPUT_DIR=items
export CBCI_TRIGGER_INTERVAL=60
export CBCI_TEST_TIME_IN_SECONDS=3600
export JENKINS_URL=""
export JENKINS_USER_ID=""
export JENKINS_API_TOKEN=""
The CBCI_*
variables are optional and have configured defaults if unset.
- Set up the script configuration.
- Copy
.env.example
to.env
and source it to set the environment variables. - Create a test pipeline called
pipeline.groovy
that will be provided to the Pipeline jobs.- An example is provided in
pipeline.groovy.example
but please customize to meet the needs of your environment.
- An example is provided in
- Copy
- Create test jobs.
- Run
./create-item-yaml.sh
to generate the CasC item YAMLs from the test pipeline. - Run
./create-items.sh
to POST the configuration YAMLs to the configured controller. - Wait until all items are created. This may take a while depending on how many test jobs you are creating.
- Run
- Run the tests.
- Run
./build.sh
and wait! - The script will trigger a random job from the test jobs and then sleep for
CBCI_TRIGGER_INTERVAL
until the elapsed time exceedsCBCI_TEST_TIME_IN_SECONDS
.
- Run
Stricter testing can be done by disabling certain plugins and features that perform periodic actions.
The following plugins and processes can be disabled to minimize periodic disk IO.
-
Support bundle generation
- Disabled with Java property
com.cloudbees.jenkins.support.SupportPlugin.AUTO_BUNDLE_PERIOD_HOURS=0
- Disabled with Java property
-
Workspace cleanup thread
- Disabled with Java property
hudson.model.WorkspaceCleanupThread.disabled=true
- Disabled with Java property
-
Fingerprint cleanup
- Disabled with CasC
unclassified: fingerprints: fingerprintCleanupDisabled: true
- Disabled with CasC
-
Global build discarders
- "Periodic background build discarder" task cannot be disabled entirely, but we can ensure the list of discarders is empty. This leaves the task iterating over all jobs but taking no action on them.
unclassified: buildDiscarders: configuredBuildDiscarders: []
- "Periodic background build discarder" task cannot be disabled entirely, but we can ensure the list of discarders is empty. This leaves the task iterating over all jobs but taking no action on them.
-
Plugin usage analyzer
- Disabled through CasC
tool: cloudbeesPluginUsageAnalyzer: enabled: false
- Disabled through CasC
All other async tasks will continue to run.