-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(create_test_release_jobs): Add job metadata files
This commit adds a simple per-folder definition file (and format documentation) format for storing additional metadata on the jenkins jobs. The metadata is appended to the end of job description and is planned to be consumed by Argus to determine both the job type and subtype. Additionally, it adds a description annotation to the pipeline file, allowing jobs to have descriptions specified Fixes scylladb/argus#428
- Loading branch information
Showing
3 changed files
with
122 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Jenkins Job Definitions | ||
|
||
Due to a growing need of having extra metadata available to jenkins consumers | ||
(both users and automation) a job define system was added to SCT jenkins generator. | ||
|
||
It replaces previous `_display_name` file (which used to contain just the display | ||
name of the folder) with a special .yaml file called `_folder_definitions.yaml`. | ||
|
||
Example definitions file: | ||
|
||
```yaml | ||
# used by argus to determine argus plugin | ||
job-type: scylla-cluster-tests | ||
# used by argus to determine which parameter wizard to use on execution | ||
job-sub-type: longevity | ||
# replacement for _display_name file, sets the jenkins folder display name | ||
folder-name: Cluster - Longevity Tests | ||
folder-description: Contains all longevity tests | ||
# Per job (regex supported) job overrides, defines as a mapping | ||
overrides: | ||
100gb: # regex, search for anything matching 100gb | ||
job-sub-type: artifact | ||
longevity-5tb-1day-gce: # specific name | ||
# overrides sub-type for argus, needed for folders that contain | ||
# for example both "artifact" and "artifact-offline" tests | ||
job-sub-type: rolling-upgrade | ||
``` | ||
A job description can also be provided as an annotation, like so: | ||
```js | ||
/** jobDescription | ||
This is a simple job description. | ||
Can be multi line and indented. | ||
Will return the description without indent. | ||
*/ | ||
``` | ||
|
||
Once template is generated the defines are applied to the job description | ||
along with job description from the pipeline file, like so: | ||
|
||
``` | ||
This is a simple job description. | ||
Can be multi line and indented. | ||
Will return the description without indent. | ||
### JobDefinitions | ||
job-sub-type: artifact | ||
job-type: scylla-cluster-tests | ||
``` | ||
|
||
If a define file was not found, a previously used mechanism is used for descriptions | ||
``` | ||
jenkins-pipelines/oss/longevity/longevity-cdc-100gb-4h.jenkinsfile | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version='1.1' encoding='UTF-8'?> | ||
<com.cloudbees.hudson.plugins.folder.Folder plugin="[email protected]"> | ||
<description></description> | ||
<description>%(sct_description)s</description> | ||
<displayName>%(sct_display_name)s</displayName> | ||
<properties> | ||
<org.jenkinsci.plugins.pipeline.modeldefinition.config.FolderConfig plugin="[email protected]"> | ||
|