Toolchain

Getting Started

To get started building your own mainframe DevOps pipeline, we have provided Jenkins pipeline examples and setup instructions.

The pages contains example code and documentation on:

  • Jenkins CI pipelines as we would suggest as starting point
  • Compuware and 3rd party tools used in the pipelines
  • Instructions setting configuring Jenkins and SonarQube
  • code snippets for specific tasks and purposes outside the general purpose

WARNING

The code published serves as example code, using Compuware’s example applications and environments. It needs to be adjusted to site specific needs and requirements.

Pipeline examples

We have published several examples of "complete" pipelines which show partly different process steps and different techniques in Jenkins.

  • Mainframe-CI-Example-pipeline - (jenkinsfile) - is a scripted pipeline using parameters. This is a simple approach to a DevOps pipeline that allows you to get up and going quickly, but may not be the best approach to scale a pipelines across your enterprise. The job is intended to be triggered after promoting code within ISPW
  • Mainframe_CI_Pipeline_from_Shared_Lib - (groovy) - is a pipeline loaded from a Jenkins shared library. Shared Libraries are a useful approach to scale pipelines across an enterprise since it moves the bulk of the pipeline logic to shared components that individual pipelines can reference a steps. This allows organizations to develop pipelines in a more standard way. The job is also intended to be triggered after promoting code within ISPW
  • The two following pipelines are supposed to be part of a more elaborate process and get triggered at different stages of that process

Tools Used

The example pipelines use a development scenario based on:

  • ISPW as SCM to store and govern mainframe sources
  • Git (GitHub) as SCM to store unit test assets
  • Topaz for Total Test as mainframe unit, functional and integration testing tool to create and maintain test assets
  • Xpediter Code Coverage as tool to gather code coverage data during execution of the unit tests
  • SonarQube as server for code analysis and setting up quality gates
  • XLRelease as CD server for release steps following the initial CI process Jenkins

Instructions on configuring the various tools can be found in the Configuration of this site.

Other Code examples

Any code examples are stored in a GitHub repository located at https://github.com/cpwr-devops/DevOps-Examples/.

  • The example pipelines using Shared Library technology will be stored in the vars folder.
  • Code related to these pipelines (class definitions) will be stored in the src folder.
  • Example code not directly related, but defining Jenkins jobs, will be stored in the src/Jenkinsfile folder. Currently these are:
    • JCL_Pipeline_Example containing a simple example of mainframe jobs being submitted from Jenkins - both, with the JCL residing on the mainframe and the JCL stored/generated in the pipeline code itself.
    • Three examples of downloading sources (COBOL programs and copybooks) from the mainframe, using different download stores for the code and methods to download, pushing the sources to SonarQube using the Sonar scanner and querying the resulting Sonar Quality Gate
    • Push_TTT_results_to_Git - (jenkinsfile) - showing how to push results of unit test execution back to GitHub for a developer to consume locally.
  • Code snippets and examples not directly related are stored in the misc-examples folder in the src directory of the repository. Currently these are:
    • ISPW-REST-API-Examples containing a Windows powershell script that demonstrates the use of ISPW's REST APIs. This code may be used a starting point if Jenkins is not the CI server of choice.

The code repository folder structure

Based on the description above and due to the requirements for the use of Pipeline Shared Libraries in Jenkins the folder structure of the DevOps-Examples repository is as follows:

    (root)
    +- src                                                  # (Groovy) source files
    |   +- com
    |   |   +- compuware
    |   |       +- devops
    |   |           +- util                                 # Classes used by the pipelines
    |   |
    |   +- Jenkinsfile                                      # "simple" example job scripts
    |   |
    |   +- misc-examples                                    # non Jenkins related (non Groovy) code examples
    |
    +- vars                                                 # Shared Library Pipeline Examples
    |
    +- resources                                            # Files used by the pipelines
        +- pipeline                                         # Configuration files for pipeline variables
        |
        +- skels                                            # Mainframe JCL "skeleton" files

People wanting to contribute

Everyone perusing these pages is welcome to provide feedback, input and suggestions for improvement; as well as asking for specific topics to be covered in the future.