3

I'm trying to trigger a Jenkins build from a USS (unix on z/os) git repository. The jenkins server is running in tomcat on my local windows machine.

Most examples on the web describe a solution like this: http://www.andyfrench.info/2015/03/automatically-triggering-jenkins-build.html

and I managed to get that working on my home pc from a local windows-based git repo to my locally running jenkins server.

Basically, this involves creating a post-commit hook and invoking a special Jenkins git endpoint via cURL. The only issue is, my organization did not install cURL on USS, so we have to do everything over ssh.

Is there a way to create a post-commit hook script on a USS system that invokes a jenkins build on windows without using cURL (likely ssh)?

My setup is: git on z/os (commit) -> trigger jenkins pipeline (on windows) -> which does some stuff to build, populate various repos on

patrickw
  • 75
  • 5
  • Sorry, I'm confused. You want the build to happen on the z/OS system, triggered from the jenkins server on Windows, correct? What is set up on the z/OS system? For example, can you submit jobs via FTP? – Kevin McKenzie Feb 27 '19 at 15:18
  • Yes that's about right. My setup is: git on z/os (commit) -> trigger jenkins pipeline (on windows) -> which does some stuff to build, populate various repos – patrickw Mar 08 '19 at 15:01

4 Answers4

2

Another option would be talk to your sysprogs, and ask them to install the Rocket Software ported tools suite, which includes cURL.

Kevin McKenzie
  • 627
  • 3
  • 18
  • https://my.rocketsoftware.com/RocketCommunity/RCLogin?nextURL=downloads&categoryName=z%2FOpenSource&toolName=cURL – Hogstrom Feb 26 '19 at 21:55
  • I am aware of this, however progress is extremely slow so I'm opting for another route as we need to build out some CI for our development pipeline soon. – patrickw Feb 27 '19 at 05:18
2

The Durable-Task-Plugin was recently updated to fix issues with SSH and encoding. This should help:

https://wiki.jenkins.io/display/JENKINS/Durable+Task+Plugin

Changelog Version 1.29 (Jan 31, 2019)
Enhancement: Add support for z/OS Unix System Services to the sh step. (JENKINS-37341)

Hogstrom
  • 3,581
  • 2
  • 9
  • 25
  • I'm not clear on how durable-task-plugin would help me here. I looked at the documentation and it speaks to monitoring processes outside of Jenkins. I want to just be able to invoke a url from a bash script on zos, triggered in a post-commit hook, and I can't use cURL. It would be good if I could somehow call the existing git Jenkins repo endpoint as it integrates well into the build jobs. – patrickw Feb 27 '19 at 05:27
1

It depends on your Windows.

The latest Windows 10 (1803+), for instance, comes with an OpenSSH server (beta feature) that you can activate.

For earlier version of Windows, you would need to install an openSSH server to listen to your hook SSH call.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

And a third option would be to use telnet to invoke the web hook, as documented here: How to make an HTTP GET request manually with netcat?

Kevin McKenzie
  • 627
  • 3
  • 18