Create a fully automated CI/CD pipeline for IBM z/OS testing using Jenkins and Zowe

This tutorial features detailed step-by-step instructions for building a fully automated Continuous Integration/Continuous Deployment (CI/CD) pipeline for your IBM z/OS testing using Jenkins and Zowe. It provides extensive details on an end-to-end automation proof-of-concept (PoC) project, along with ample guidance and ideas to help you develop a concept for successfully building your CI/CD pipeline to drive fully automated z/OS testing capabilities.

Prerequisites

To complete this tutorial, you’ll need:

Tools/Components

  • REXX EXECs and job control language (JCL) jobs
  • A GitHub repository
  • Jenkins software product
  • Three simple Microsoft Windows batch script (.bat files)
  • Jenkinsfile
  • Zowe CLI

Skills/Experience

It helps to have some preliminary skills and working experience with the tools/components listed above. Knowing at least how they work is desirable; however, this is not mandatory, as this tutorial provides ample details to help you get up and running with a z/OS automation POC project.

Version-level requirement

It is always desirable and recommended to use the latest, supported version and maintenance levels with open source tools and plug-ins such as GitHub, Jenkins, and Zowe. You can always download the latest, supported versions and maintenance levels using the links provided in the Tools/Components list above.

The logical partition (LPAR) with which you are going to interact must have z/OS Management Facility (z/OSMF) running. You should check with your systems administrator for more details about it. Also, it is assumed that your local system on which this POC project would be undertaken is running the Microsoft Windows operating system.

Estimated time

It should normally take around 3 to 4 hours to create a fully automated CI/CD pipeline for IBM z/OS testing using Jenkins and Zowe.

Steps

Step 1: Install Zowe CLI

Read through the instructions for Installing Zowe CLI and install it in your local system. Then make sure that you have Node.js and node package manager (NPM) installed by running simple commands (to find the installed version) and a simple test program.

Test Node.js installation

To see if Node.js has been successfully installed, open the Windows Command Prompt, PowerShell, or a similar command-line tool, and type the node -v command. This should print a version number, so you should see something like v13.11.0 as the output.

Microsoft Windows [Version 10.0.18363.1082]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\user1>node -v
v13.11.0

Test NPM installation

To see if NPM has been successfully installed, type the npm -v command in the terminal. This should print the NPM version number that’s installed, so you should see something like 6.13.7 as the output.

C:\Users\user1>npm -v
6.13.7

Create a test file and run it to verify that Node.js works on your system

A simple way to test that Node.js works on your system is to create a simple JavaScript file (named hello.js, for example) and add the code console.log('Node.js is installed!') to the file. To run the code, open your command-line program, navigate to the location where you have saved the file, and type node hello.js. This starts Node.js and runs the code in the hello.js file. You should see the output Node.js is installed!

Microsoft Windows [Version 10.0.18363.1082]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\user1>CD C:\Users\user1\Desktop

C:\Users\user1\Desktop>node hello.js
Node.js is installed!

Zowe CLI installation verification

At the command prompt, run the zowe --version command. The output displays the current installed version of Zowe CLI, and you should see something like 6.22.0 as the output. If you see the desired output, you can be confident that Zowe CLI is successfully installed on your system.

C:\Users\user1>zowe --version
6.22.0

Step 2: Code some REXX EXECs

First, you need to code four simple REXX EXECs. Let’s create the following REXX EXECs:

  • SMPREX00
  • SMPREX01
  • SMPREX02
  • SMPREX03
SMPREX00
****** ********************************* Top of Data **********************************
000001 /* REXX **************************************************************/         
000002 SAY ' >>>>> '                                                                   
000003 SAY '  REXX PROGRAM #01'                                                        
000004 SAY ' <<<<< '                                                                   
****** ******************************** Bottom of Data ********************************
SMPREX01
********************************* Top of Data **********************************
/* REXX **************************************************************/         
SAY ' >>>>> '                                                                   
SAY '  REXX PROGRAM #02'                                                        
SAY ' <<<<< '                                                                   
******************************** Bottom of Data ********************************
SMPREX02
********************************* Top of Data **********************************
/* REXX **************************************************************/         
SAY ' >>>>> '                                                                   
SAY '  REXX PROGRAM #03'                                                        
SAY ' <<<<< '                                                                   
******************************** Bottom of Data ********************************

SMPREX03

********************************* Top of Data **********************************
/* REXX **************************************************************/         
SAY ' >>>>> '                                                                   
SAY '  REXX PROGRAM #04'                                                        
SAY ' <<<<< '                                                                   
******************************** Bottom of Data ********************************

As you can see, each REXX program prints only three display messages. This is to keep things simple — remember, you are not here to learn how to code REXX EXECs!

Step 3: Code some JCL jobs

Now it is time to code four JCL jobs. Let’s name them REXEXC00, REXEXC01, REXEXC02, and REXEXC03.

Job REXEXC00 runs the first REXX program, SMPREX00, in the first job step, and sets the maximum condition code of the job to 01 in the second and final job step.

REXEXC00
********************************* Top of Data **********************************
//REXEXC00 JOB (5990),'BATCH IVP',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,            
//      TIME=NOLIMIT                                                            
//**********************************************************************        
//**********************************************************************        
//REXJ     EXEC PGM=IKJEFT01,DYNAMNBR=45                                        
//SYSPROC  DD DISP=SHR,DSN=HLQ1.HLQ2.JOBS                                  
//SYSTSPRT DD SYSOUT=*                                                          
//SYSTSIN  DD *                                                                 
%SMPREX00                                                                       
//*                                                                             
//IDCAMS   EXEC PGM=IDCAMS,COND=(0,NE,REXJ)                                     
//SYSPRINT DD SYSOUT=*                                                          
//SYSOUT   DD SYSOUT=*                                                          
//SYSIN    DD *                                                                 
 SET MAXCC=1                                                                    
//*                                                                             
//                                                                              
******************************** Bottom of Data ********************************

Note: DDName SYSPROC references the partitioned data set (PDS) that houses the REXX EXEC or the SMPREX00 program source code as a member.

Job REXEXC01 runs the REXX program SMPREX01.

REXEXC01
********************************* Top of Data **********************************
//REXEXC01 JOB (5990),'BATCH IVP',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,            
//      TIME=NOLIMIT                                                            
//**********************************************************************        
//**********************************************************************        
//REXJ     EXEC PGM=IKJEFT01,DYNAMNBR=45                                        
//SYSPROC  DD DISP=SHR,DSN=HLQ1.HLQ2.JOBS                                  
//SYSTSPRT DD SYSOUT=*                                                          
//SYSTSIN  DD *                                                                 
%SMPREX01                                                                       
//*                                                                             
//                                                                              
******************************** Bottom of Data ********************************

Job REXEXC02 runs the third REXX program, SMPREX02, in the first job step, and sets the maximum condition code of the job to 02 in the second and final job step.

REXEXC02
********************************* Top of Data **********************************
//REXEXC02 JOB (5990),'BATCH IVP',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,            
//      TIME=NOLIMIT                                                            
//**********************************************************************        
//**********************************************************************        
//REXJ     EXEC PGM=IKJEFT01,DYNAMNBR=45                                        
//SYSPROC  DD DISP=SHR,DSN=HLQ1.HLQ2.JOBS                                  
//SYSTSPRT DD SYSOUT=*                                                          
//SYSTSIN  DD *                                                                 
%SMPREX02                                                                       
//*                                                                             
//IDCAMS   EXEC PGM=IDCAMS,COND=(0,NE,REXJ)                                     
//SYSPRINT DD SYSOUT=*                                                          
//SYSOUT   DD SYSOUT=*                                                          
//SYSIN    DD *                                                                 
 SET MAXCC=2                                                                    
//*                                                                             
//                                                                              
******************************** Bottom of Data ********************************

Job REXEXC03 runs the fourth REXX program, SMPREX03.

REXEXC03
********************************* Top of Data **********************************
//REXEXC03 JOB (5990),'BATCH IVP',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID,            
//      TIME=NOLIMIT                                                            
//**********************************************************************        
//**********************************************************************        
//REXJ     EXEC PGM=IKJEFT01,DYNAMNBR=45                                        
//SYSPROC  DD DISP=SHR,DSN=HLQ1.HLQ2.JOBS                                  
//SYSTSPRT DD SYSOUT=*                                                          
//SYSTSIN  DD *                                                                 
%SMPREX03                                                                       
//*                                                                             
//                                                                              
******************************** Bottom of Data ********************************

Step 4: Create your first “Freestyle project” item in Jenkins

Next, you’ll spend some time playing around with the Jenkins software. You will soon create your first “Freestyle project: item in Jenkins, but before that you need to set up a few things correctly.

You should set up a GitHub repository for the project, then you should clone it to your local machine.

Go to your repo, click the Code button, and copy the web URL.

Code button

Code button

Open the Windows command prompt and use the git clone command to copy the repo to your local machine. In my case, before running the git clone command, I had to make sure that I had an empty directory/folder (named zOS-Testing-Automation-using-Jenkins-and-Zowe) created.

git clone command
C:\Users\user1>git clone https://github.com/SubhasishSarkarIndia/zOS-Testing-Automation-using-Jenkins-and-Zowe.git C:\Users\user1\zOS-Testing-Automation-using-Jenkins-and-Zowe
Cloning into 'C:\Users\user1\zOS-Testing-Automation-using-Jenkins-and-Zowe'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.

Next, you want to automatically copy your four JCL job PDS members on z/OS as .txt files and place those files on your local machine. In this case, you’ll use FTP. Include the following lines in a .txt file (let’s call it SampleFTP.txt) and place the file on your desktop (or, for that matter, anywhere on your local Windows system).

open nnn.nnn.nnn.nnn
XXXXXXXX
ZZZZZZZZ
get 'HLQ1.HLQ2.JOBS(REXEXC00)' REXEXC00.txt
get 'HLQ1.HLQ2.JOBS(REXEXC01)' REXEXC01.txt
get 'HLQ1.HLQ2.JOBS(REXEXC02)' REXEXC02.txt
get 'HLQ1.HLQ2.JOBS(REXEXC03)' REXEXC03.txt
quit

Note: In the above code listing, nnn.nnn.nnn.nnn, XXXXXXXX, and ZZZZZZZZ should be replaced with the IP address of the z/OS system, your Time Sharing Option (TSO) logon user ID, and password, respectively.

Now let’s create a Windows batch script (for example, SampleFTP.bat). You can place the file in the same location as SampleFTP.txt. The batch script automatically copies the z/OS JCL job .txt files and performs a commit to the repo. The batch script should look like the following:

cd C:\Users\user1\Desktop
ftp -s:SampleFTP.txt
xcopy /y REXEXC00.txt "C:\Users\user1\zOS-Testing-Automation-using-Jenkins-and-Zowe"
xcopy /y REXEXC01.txt "C:\Users\user1\zOS-Testing-Automation-using-Jenkins-and-Zowe"
xcopy /y REXEXC02.txt "C:\Users\user1\zOS-Testing-Automation-using-Jenkins-and-Zowe"
xcopy /y REXEXC03.txt "C:\Users\user1\zOS-Testing-Automation-using-Jenkins-and-Zowe"
del REXEXC00.txt
del REXEXC01.txt
del REXEXC02.txt
del REXEXC03.txt
cd C:\Users\user1\zOS-Testing-Automation-using-Jenkins-and-Zowe
echo ((((( Some sample text being entered here solely for testing purposes ))))) %DATE% %TIME%> README.md
git add .
git commit -m "Required files updated."
git push

Note: The xcopy statements copy the FTP’ed JCL job .txt files to the GitHub repository folder location that was previously cloned to your local system.

Now you can create your first “Freestyle project” item in Jenkins. This should serve as your initial trigger job. Click the New Item option.

New Item option

New Item option

Then select Freestyle project and enter a name for the project — let’s name it Trigger-Script — and then click OK.

Freestyle project

Freestyle project

In the Source Code Management tab, select None.

Source Code Management

Source Code Management tab

In the Build Triggers tab, select the Build periodically check box to schedule the job to be triggered every day at 03:15 PM local time (in this case, IST or Indian Standard Time) and click Save.

Build Triggers

Build Triggers tab

In the Build Environment tab, select the Add timestamps to the Console Output checkbox and click Save.

Build Environment

Build Environment tab

Click Add build step and select Execute Windows batch command from the dropdown list. And then for the command, you should enter the full path to the batch file so that the batch script gets automatically triggered for execution.

Add build step

Add build step

Then, you can add a post-build action of Editable Email Notification.

Enter a value in the Project From field. This is the “Email from” field value in the actual email that you will eventually receive. Also, select a value from the Attach Build Log drop-down list. The Attach Build Log option saves the build log as an attachment to the email that will eventually be sent out. Select the checkbox corresponding to the Save to Workspace field.

Click Save to save the job details.

Step 5: Learn how to manage Zowe z/OSMF profiles

Now let’s create a Zowe z/OSMF profile to be used specifically for this PoC project. Run the following command at the command prompt:

zowe profiles create zosmf-profile Zowe-zOSMF-Profile-SS-POC-Project --host LPR1 --port nnnnn --user XXXXXX --password ZZZZZZZZ --reject-unauthorized false

This creates a Zowe z/OSMF profile called “Zowe-zOSMF-Profile-SS-POC-Project” to connect to z/OSMF at host LPR1 and port nnnnn, and allow self-signed certificates.

C:\Users\user1>zowe profiles create zosmf-profile Zowe-zOSMF-Profile-SS-POC-Project --host LPR1 --port nnnnn --user XXXXXX --password ZZZZZZZZ --reject-unauthorized false
Profile created successfully! Path:
C:\Users\user1\.zowe\profiles\zosmf\Zowe-zOSMF-Profile-SS-POC-Project.yaml

host:               LPR1
port:               nnnnn
user:               XXXXXX
password:           ZZZZZZZZ
rejectUnauthorized: false

Review the created profile and edit if necessary using the profile update command.

Set the profile (that you just created) as the default profile for type zosmf. Run the following command:

C:\Users\user1>zowe profiles set-default zosmf-profile Zowe-zOSMF-Profile-SS-POC-Project

The default profile for zosmf is set to Zowe-zOSMF-Profile-SS-POC-Project.

To check if your default profile for type zosmf was set correctly, run the zowe profiles list zosmf-profiles command:

C:\Users\user1>zowe profiles list zosmf-profiles
SSMtM2020
Zowe-zOSMF-Profile-SS-POC-Project (default)

If you already have a Zowe z/OSMF profile that you want to use and you don’t want to create a new one, you can use your existing profile. Just make sure that you have the correct profile set as your default profile for type zosmf.

For a list of various commands that you can issue through the Zowe CLI, run the zowe --help command.

Step 6: Create your first Windows batch Zowe script

Let’s name our first Windows batch Zowe script “Batch-Execution-#01.bat”. The batch script should consist of the following lines of code:

SETLOCAL ENABLEDELAYEDEXPANSION
cd C:\Users\user1\AppData\Roaming\npm
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC00)" --wfo --rff retcode --rft string') do set RC=%%i
if "%RC%"=="CC 0001" (
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC01)" --wfo --rff retcode --rft string') do set RC=%%i
)    
if "%RC%"=="CC 0000" (
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC02)" --wfo --rff retcode --rft string') do set RC=%%i
)
if "%RC%"=="CC 0002" (
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC03)" --wfo --rff retcode --rft string') do set RC=%%i
)
if "%RC%"=="CC 0000" (
echo ALL JOBS RAN SUCCESSFULLY !
)

Note that this Windows batch Zowe script is used for multiple JCL jobs submission post verification of MAXCC. The code line cd C:\Users\user1\AppData\Roaming\npm is mandatory, as Jenkins doesn’t recognize Zowe as an executable file, so you must provide the path. Delayed expansion can cause variables within a batch file to be expanded at execution time rather than at parsing time, and this option is turned on with the SETLOCAL EnableDelayedExpansion command. for /f is used as a loop command to perform an action against each Zowe command. tokens=* means any output and %%i stores that output. Two Zowe commands placed one after another will not work, and post execution of the first command the script will exit. Therefore, using the for command you can run multiple Zowe commands in a single script. The script runs four JCL jobs, one after another, by waiting for the job to come to the output queue (wfo), and then recording their MAXCC and proceeding with the execution of the next JCL job only when the specified logical MAXCC condition is met. If required, you can include comments in your script by using the REM statement, as follows.

REM This is used for REMarks in a batch script file. This is not an executable statement.

Your first Windows batch Zowe script has been coded so that all four of the JCL jobs will be submitted for execution on z/OS. As you can understand, the MAXCC being returned by a job after it has completed its execution holds the key to the submission of all the four JCL jobs to z/OS.

Step 7: Create your second Windows batch Zowe script

Let’s name our second Windows batch Zowe script “Batch-Execution-#02.bat”. It should consist of the following lines of code:

SETLOCAL ENABLEDELAYEDEXPANSION
cd C:\Users\user1\AppData\Roaming\npm
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC00)" --wfo --rff retcode --rft string') do set RC=%%i
if "%RC%"=="CC 0001" (
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC01)" --wfo --rff retcode --rft string') do set RC=%%i
)    
if "%RC%"=="CC 0000" (
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC02)" --wfo --rff retcode --rft string') do set RC=%%i
)
if "%RC%"=="CC 0001" (
for /f "tokens=*" %%i in ('zowe zos-jobs submit data-set "HLQ1.HLQ2.JOBS(REXEXC03)" --wfo --rff retcode --rft string') do set RC=%%i
)
if NOT "%RC%"=="CC 0000" (
echo ALL JOBS DIDN'T RUN !
)

Your second Windows batch Zowe script has been coded in a manner that the REXEXC03 JCL job will not get submitted for execution on z/OS. As you can understand, the REXEXC02 job has been coded to return a MAXCC 0002 value after it has completed its execution, and for the REXEXC03 job to be submitted to z/OS, REXEXC02 needs to return MAXCC 0001.

Step 8: Create your second “Freestyle project” item in Jenkins

Now it’s time to create your second “Freestyle project” item in Jenkins. Let’s name the project “Script-01.”

In the Source Code Management tab, select None. Add Execute Windows batch command as a build step and then, in the Command field, enter the full path to the first Windows batch Zowe script (Batch-Execution-#01.bat) so that the batch script gets automatically triggered for execution.

Add build step

Add build step

Finally, add a post-build action of Editable Email Notification and click Save to save the job details.

Step 9: Create your third “Freestyle project” item in Jenkins

Let’s move on to the third “Freestyle project” item in Jenkins. Let’s name the project “Script-02” and select None as the Source Code Management value. Once again, add Execute Windows batch command as a build step. And then in Command field, enter the full path to the second Windows batch Zowe script (Batch-Execution-#02.bat) so that the batch script gets automatically triggered for execution. Finally, add a post-build action of Editable Email Notification and click Save to save the job details.

One of the main objectives of this PoC project is to confirm that you can use Jenkins and Zowe to automatically trigger the execution of JCL jobs on z/OS such that the successor jobs are submitted/executed depending on the return code of the predecessor job.

Step 10: Create the Jenkinsfile

Create a Jenkinsfile named “Jenkinsfile.groovy” that has the following content:

pipeline {
        agent any
        stages {
            stage('Script-01') {
                steps {
                    script {
                            build job: 'Script-01'
                        }
                    }
               }   
            stage('Script-02') {
                steps {
                    script {
                            build job: 'Script-02'
                        }
                    }
               }   
           }
       }

Next, upload the Jenkinsfile.groovy file to the master branch of your GitHub repository.

Jenkinsfile in GitHub repo

Jenkinsfile in GitHub repo

Step 11: Build a multibranch pipeline in Jenkins

And now the final piece of the puzzle — building a multibranch pipeline in Jenkins. Click New Item and select Multibranch Pipeline. Enter a name for the pipeline — let’s call it “Experiment-MultiBranch-Pipeline-01” — and then click OK.

Multibranch Pipeline name

Multibranch Pipeline name

Add a GitHub source in the Branch Sources section. Add your GitHub credentials in the Credentials field. Select the Repository HTTPS URL option. In the Repository HTTPS URL field, enter the same URL that you previously specified in the git clone command in your first freestyle project.

In the Branch Sources tab, specify the values as shown in the following figure:

Branch Sources

Branch Sources

Build Configuration, Scan Repository Triggers, and Orphaned Item Strategy

Build Configuration

Choose the Scan Repository Triggers interval option of 2 minutes. This means that the Jenkins pipeline will poll your GitHub repository every 2 minutes to check for any commits made to the repo. Whenever the initial Jenkins trigger job (named “Trigger-Script” ) performs a commit action to the GitHub repository, the multibranch pipeline triggers a build process as per the Groovy script present in the Jenkinsfile, and the jobs start running on z/OS. Thus, the multibranch pipeline triggers a scan of the GitHub repository every 2 minutes (which is the polling interval).

In the Health metrics tab, specify the options as shown in the following figure:

Health metrics

Health metrics

Click Save to save the multibranch pipeline details.

Step 12: Create a Zowe z/OSMF profile using Jenkins

Now it’s time to create your fourth “Freestyle project” item in Jenkins. Let’s name it “Zowe-zOSMF-Profile.” Select None as the Source Code Management value. Add Execute Windows batch command as a build step 3 times.

Add build step

Add build step

Finally, you can add a post-build action of Editable Email Notification and then click Save to save the job details.

Initiate a manual trigger of the build process for the Zowe-zOSMF-Profile project.

Click the icon (highlighted in the following figure) to manually initiate the Zowe-zOSMF-Profile project build process. After the build process execution for the project is complete, check the console output.

Manually initiate build process

Manually initiate build process

Click Zowe-zOSMF-Profile first, and then click Workspace.

Check the console output 1

Check the console output 1

Click Build History, and then select Console Output corresponding to the highest displayed sequence number (#7 in the following figure):

Check the console output 2

Check the console output 2

C:\Users\user1\AppData\Roaming\npm>zowe profiles create zosmf-profile Zowe-zOSMF-Profile-Jenkins --host LPR1 --port nnnnn --user XXXXXX --password ZZZZZZZZ --reject-unauthorized false 
Profile created successfully! Path:
C:\WINDOWS\system32\config\systemprofile\.zowe\profiles\zosmf\Zowe-zOSMF-Profile-Jenkins.yaml

[33mhost: [39m              LPR1
[33mport: [39m              [34mnnnnn[39m
[33muser: [39m              XXXXXX
[33mpassword: [39m          ZZZZZZZZ
[33mrejectUnauthorized: [39m[31mfalse[39m

Review the created profile and edit if necessary using the profile update command:

C:\Users\user1\AppData\Roaming\npm>zowe profiles set-default zosmf-profile Zowe-zOSMF-Profile-Jenkins

The default profile for zOSMF is set to Zowe-zOSMF-Profile-Jenkins:

C:\Users\user1\AppData\Roaming\npm>zowe profiles list zosmf-profiles 
Zowe-zOSMF-Profile-Jenkins (default) 
Zowe-zOSMF-Profile-SS-POC-Project2

Step 13: Test your automation project

Now it’s time to test what you have developed. Although the initial Jenkins trigger job (named “Trigger-Script” ) build process has been scheduled to be triggered automatically every day at 03:15 PM local time (in this case, IST), you can perform a manual trigger of the Trigger-Script build to test the entire PoC. The Trigger-Script job should perform a commit action to your GitHub repository.

Trigger-Script commits to repo

Trigger-Script commits to repo

The commit made to the repo should automatically trigger the pipeline build process. After the pipeline has completed executing, you can check the console output.

Click Experiment-MultiBranch-Pipeline-01.

Jenkins – click the pipeline link

Click Build History.

Jenkins – click on Build History

Jenkins – click on Build History

Click the highlighted Console Output icon.

Jenkins – click on the Console Output icon

Jenkins – click on the Console Output icon

Then, scroll down and view the content of the console output.

Script-01 console output

Script-01 console output

You should see a Finished: SUCCESS message at the bottom. And the display of the message ALL JOBS RAN SUCCESSFULLY in the console output confirms the success of the test case. You should confirm that all the four JCL jobs — namely, REXEXC00, REXEXC01, REXEXC02 and REXEXC03 — were successfully submitted to z/OS.

Now, let’s view the console output for the Script-02 job. You should see a Finished: SUCCESS message at the bottom. However, for Script-02, the presence of the message ALL JOBS DIDNT RUN` in the console output confirms the success of the test case. You should confirm that only the JCL jobs (REXEXC00, REXEXC01 and REXEXC02) were successfully submitted to z/OS.

You should see the following sequence of jobs submitted to z/OS:

JOBNAME
REXEXC00
REXEXC01
REXEXC02
REXEXC03
REXEXC00
REXEXC01
REXEXC02

Summary

As organizations move towards being more and more agile, the mean time to market becomes an extremely important factor — faster, better, and most importantly, without compromising on the quality. IBM mainframes are a critical component of an enterprise’s IT infrastructure and should be a part of the organization’s CI/CD DevOps initiatives. This PoC demonstrates how to achieve a fully automated CI/CD pipeline for z/OS testing. If your organization wants to achieve a fully automated CI/CD DevOps pipeline, automating the testing infrastructure is a key element and this PoC shows you how to achieve a fully automated z/OS testing CI/CD pipeline, thereby enabling the all-important mantra of faster velocity with uncompromising quality to succeed.

If you have successfully completed the tasks mentioned in this PoC, the next step is to experiment further by building more automation capabilities with Z Open Automation (ZOA) Utilities. This provides you with the benefit of being able to use the most appropriate technologies, tools, and resources for your specific use case.

For more information about ZOA Utilities, check out Z Open Automation Utilities 1.1.1.