Configuration Files
Both files are being read using the libraryResource method, provided by Jenkins Shared Libraries and converted to yaml objects using the readYaml method, provided by the Pipeline Utility Steps plugin.
pipelineConfig.yml
The resources\pipelineConfig.yml file contains configuration settings about the 'environment' the Jenkins pipeline is executing in/for, i.e. URLs of servers like SonarQube or XL Release and others. It is being processed by:
def pipelineConfig = readYaml(text: libraryResource(configFile))
The resulting pipelineConfig can then be used to access the configuration values, e.g.:
The content of the file is:
url: "https://github.com"
tttRepoExtension: "_Total_Tests.git"
branch: "master"
sq:
scannerName: "scanner"
serverName: "localhost"
xlr:
template: "A Release from Jenkins"
user: "admin"
ttt:
general:
folder: "Tests"
sonarResultsFolder: "./TTTSonar"
sonarResultsFile: "generated.cli.suite.sonar.xml"
virtualized:
folder: "Virtualized_Tests"
environment: "123456789012345678901234"
targetSonarResults: "generated.cli.vt.suite.sonar.xml"
nonVirtualized:
folder: "Non_Virtualized_Tests"
environment: "123456789012345678901234"
targetSonarResults: "generated.cli.nvt.suite.sonar.xml"
ces:
url: "http://ces.url:2020"
ispw:
runtime: "ispw"
changedProgramsFile: "changedPrograms.json"
mfSourceFolder: "MF_Source"
To determine the appropriate values to use, refer to the description of the pipeline parameters.
mailList.yml
The resources\mailList.yml file contains a list of TSO user ID, mail address pairs.
After reading the file, the result can be used to retrieve the email address based on the owner of the Code Pipeline container and send mail message to the desired recipient:
def mailList = readYaml(text: libraryResource(mailListFile))
def mailRecipient = mailList[(pipelineParams.ispwOwner.toUpperCase())]