Jenkins Pipeline Script - Documentation for Bmc Ami Devx Mainframe Devops

Global variables

The first part initializes global variables that are specific to the environment the pipeline executes in and will neither differ between executions of any given job, nor between different jobs using the same script.

NameDescription
Git_URLURL to the GitHub project containing the repository storing the TTT projects
Git_TTT_Repo    Name of the repository
Git_BranchGitHub branch to use for accessing the TTT scenarios
SQ_Scanner_NameName of the Sonar Scanner as defined in Jenkins Manage Jenkins->Global Tools Configuration->SonarQube Scanner
SQ_Server_NameName of the SonarQube server configuration in Jenkins Manage Jenkins->Configure System->SonarQube servers
SQ_ProjectName of the SonarQube project to use
MF_Source

Folder that the Code Pipeline download plugin will download the sources to

XLR_TemplateName of the XLRelease release template to use when triggering the release
XLR_UserJenkins credentials token to use to connect to XLRelease
TTT_FolderThe code will download the TTT projects to this sub folder of the Jenkins workspace
TTT_Vt_Environment

ID of environment defined in the Total Test repository to be used for execution of tests

TTT_Sonar_Results_File

Name of the SonarQube results file generated by the Total Test CLI

CES_UrlURL for CES
ISPW_Runtime

Code Pipeline runtime configuration to use

ISPW_Changed_Programs_File

Name for the .json file created by Code Pipeline for Intelligent Test Case Execution

mailRecipientMap

Groovy Map to store Code Pipeline Owner Ids (TSO user id) and email addresses

 String Git_URL                     = ""
 String Git_Ttt_Repo                = "${ISPW_Stream}_${ISPW_Application}_Total_Tests.git"
 String Git_Branch                  = "master"
 String SQ_Scanner_Name             = "scanner" 
 String SQ_Server_Name              = "localhost"  
 String SQ_Project                  = "${JOB_NAME}" 
 String MF_Source                   = "MF_Source"
 String XLR_Template                = "A Release from Jenkins"
 String XLR_User                    = "admin"                           
 String TTT_Base_Folder             = "Tests"	
 String TTT_Vt_Folder               = "Virtualized_Tests"	
 String TTT_Vt_Environment          = '123456789123456789123456'  
 String TTT_Sonar_Results_File      = './TTTSonar/generated.cli.suite.sonar.xml'
 String CES_Url                     = ""
 String ISPW_Runtime                = "ispw"	
 String ISPW_Changed_Programs_File  = 'changedPrograms.json'	 

 Map    mailRecipientMap            = ["ABC1234":""]

Node and stages

The node statement tells Jenkins which node (agents in a Jenkins network) to use. It may be used to distribute work, run jobs in parallel, or run steps in a job in parallel. This pipeline will use one node with several stages. All variables defined within the node are local to the node and available to all stages therein.

node{
David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest