13

Assume somebody familiar with DevOps and mainframes, but new to Jenkins, wants to get started with Jenkins, e.g. to:

After some kind of (minimal) Jenkins installation and configuration got completed, the actual question becomes "Which of the typical Jenkins plugins, if any, would be needed?". From the various Jenkins plugins that appear to make sense in my case, it seems that these are possible candidates (quotes are from the linked pages):

  • IBM zOS Connector.

    ... provides its functions via FTP connection to IBM z/OS LPAR. You can configure your SCLM project on z/OS and then check for the changes via Jenkins.

    Features include:

    • Submission of user JCL job (with optional log collected upon finish).
    • Introduction of SCLM as SCM for your projects allowing to checkout SCLM changes.
    • The ability to build SCLM projects currently can be performed only via 'Submit zOS Job' build action.
  • Compuware Source Code Download for Endevor, PDS, and ISPW Plugin.

    ... allows Jenkins users to download Endevor, PDS, or ISPW members from the mainframe to the PC. Source can then be accessed on the PC, for example, for SonarQube analysis and reporting.

Since the 1st plugin is about SCLM (which is all about PDSes), and the 2nd plugin explicitly states support for PDSes (in its name), I trust both are possible candidates.

So assuming my shortlist is complete (is it?), what are the pros and cons of either one that should help me decide which one is best for my case?

Ps: Something like a "Jenkins Kickstart" package doesn't seem to exist (at least I've not found it yet).

  • 1
    By searching, a lot of searching, and maybe asking here when there's a pitfall on a specific subject. While building a resource of Q/A is great, that really too broad as is. – Tensibai Mar 3 '17 at 14:48
  • 1
    The question would be easier to answer if you would to outline a problem you want to solve with Jenkins. Trying to solve a specific problem is also a good start to learn a new tool! – Michael Le Barbier Grünewald Mar 3 '17 at 14:58
  • 1
    @Pierre.Vriens Seems far better now; thanks for editing. I've voted to reopen. – Aurora0001 Mar 3 '17 at 17:03
  • 1
    After réflexion, just don't try to generalize too much your question , describe the problem you're facing and where you're facing a wall , I think that's the best way. – Tensibai Mar 3 '17 at 17:28
  • 1
    @Tensibai merci for all the comments (attempts to help) ... Yes "a bit" harsh, but don't worry too much about that (I can handle that). Apart from that: hang on for a new attempt to improve (narrow down) my question. – Pierre.Vriens Mar 3 '17 at 17:45
2

I set up jenkins to manage mainframe tables. Essentially utilizing groovy script plugin. I wrote code that handles movement of files on the mainframe and call them though the plugin. Essentially leveraging the mainframes API to connect and the vsc's commands to move the files.

2

Jenkins slave runs in unix system services of z/OS and can run any script or function from there. We use the Git plugin to pull the source code onto z/OS then you have different choices of how to work with it. You can use IBM Dependency Based Build which is Groovy ported to z/OS plus some extensions to specifically work with native z/OS functions such as copy to PDS (or PDSE) or copy back to zFS, as well as the ability to run MVS, TSO, ISPF commands and submit JCL.

Also with the new Zowe announcement Zowe.org for a new open source project on z/OS you also have access to a number of REST based APIs work with files and perform other tasks on z/OS such as calling zOSMF.

  • I plan to do this: store all mainframe files in GitHub, and install Jenkins slave in USS in z/OS. During a commit or pull request, the webhook in GitHub will kick-off a Jenkins job which will downloads the file from GitHub and submit to z/OS for compile and link (we have perl scripts to do this now). What do you think? – Jirong Hu Jun 21 at 18:30
1

In general, there are two ways to automate actions from Jenkins:

  1. Install a plugin for Jenkins and use it in steps to automate tasks.
  2. Write a script (shell, python, other) and call it from a step to automate tasks.

There are drawbacks / benefits to both approaches. While #1 - the plugin approach - gives you out of the box functionality and does not require you to script, it may be rigid and limited in its abilities. #2 - the scripting approach - requires you to write scripts, as well as maintain them, but may provide much more flexibiity and freedom in automating things.

The scripting approach generally uses a lot of CLIs - aws cli, docker cli, etc.

If #2 - the scripting approach - is viable and you're comfortable with writing shell scripts or other scripts like python to interact with the mainframe, then Brightside can help.

Here's an example of using Brightside (free CLI) to interact with PDS on z/OS from a shell script:

    #!/bin/sh
    echo 'bright files create classic "USER.PUBLIC.SAMPLE.PDS"'
    bright files create classic "USER.PUBLIC.SAMPLE.PDS"
    echo ''

    echo 'bright files download all-members "USER.LIB.SAMP" -d MyPDS'
    bright files download all-members "USER.LIB.SAMP" -d MyPDS
    echo ''

    echo 'bright files upload dir-to-pds MyPDS "USER.PUBLIC.SAMPLE.PDS"'
    bright files upload dir-to-pds MyPDS "USER.PUBLIC.SAMPLE.PDS"
    echo ''

    echo 'bright files list all-members "USER.PUBLIC.SAMPLE.PDS"'
    bright files list all-members "USER.PUBLIC.SAMPLE.PDS"
    echo ''

    echo 'bright files delete data-set "USER.PUBLIC.SAMPLE.PDS(ALLOCLIB)" -f'
    bright files delete data-set "USER.PUBLIC.SAMPLE.PDS(ALLOCLIB)" -f
    echo ''

    echo 'bright files list all-members "USER.PUBLIC.SAMPLE.PDS"'
    bright files list all-members "USER.PUBLIC.SAMPLE.PDS"
    echo ''

    echo 'bright files delete data-set "USER.PUBLIC.SAMPLE.PDS" -f'
    bright files delete data-set "USER.PUBLIC.SAMPLE.PDS" -f
    echo ''

Here's the output from that script:

enter image description here enter image description here

Easy enough to call these scripts from Jenkins and parse the output for whatever purpose.

Full disclosure: I work for CA who created Brightside but we do use this CLI internally for the exact purpose of integrating our mainframe application testing with Jenkins.

  • Have you used it? – chicks Jun 12 '18 at 18:11
  • I fail to see how this may answer the question even remotely, please edit your answer to explain how it can answer the question or I'll delete it in 24h – Tensibai Jun 12 '18 at 21:36
  • Sure, I'll add more detail to my post. – Sujay Solomon Jun 13 '18 at 14:26
  • One more thing, please disclose your affiliation with the company you're promoting. See the self-promotion paragraph in our behavior page. This sounds like an honest attempt to answer, I'm feel it miss the point of using a plugin integrated in jenkins for pipeline use, but at least it doesn't look like 'product promotion only' anymore. – Tensibai Jun 13 '18 at 15:50
  • TL;DR: answering with a product you own/create is ok when you disclose your link with the product and explain how it can solve the problem. – Tensibai Jun 13 '18 at 15:53
1

@Pierre.Vriens, wrt your ask about “investigate the feasibility of managing data stored in personal files (PDSes, i.e. partitioned data sets) on the mainframe.”, you can use zOS Management Facility (zOSMF) which comes with the z/OS operating system to access APIs for that. In Sujay's reply, he suggests using Brightside and that tool taps into the zOSMF APIs to simplify that task. So then if you want to tie Jenkins to the Mainframe to manage Partitioned Data Sets (PDS) and Data Sets (PS), you can use these zOSMF APIs or you could use Brightside.

In the spirit of disclosure, I work as a UX Designer for CA Technologies who builds Brightside.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.