Configuring a Jenkins agent
In this step, you create a Jenkins z/OS® agent configuration to be able to run OpenShift® Jenkins builds on z/OS. All the following actions must be done in the Jenkins server web console.
From the Jenkins dashboard, click Build Executor Status.
In the Nodes page that opens, you can see a default agent, named master
. However, you need to create a z/OS agent. To do so, click New Node. Enter e2e-pipeline
in the Name field and select Permanent Agent. Then, click OK.
In the configuration page that opens, enter the following information:
Enter the remote directory in Remote root directory. It can be
/var/jenkins/agent/e2e-pipeline
, but it varies according to your environment. It is the working directory of the agent.Enter
e2e-pipeline
in Label.Select Launch agents via SSH in Launch method.
Enter the hostname of your z/OS in Host.
Note: If you want to target a Wazi sandbox, you can retrieve this information from the IBM® Wazi Sandbox services.For the credential, select Add > Jenkins.
Make sure that Username with password is selected in the Kind dropdown list. In Username, enter the z/OS ssh username that will own the Jenkins agent process. In Password, enter the z/OS password of the ssh user. Enter
zosuser_id
in ID andz/OS User
in Description. Then, click Add.Then, select the newly created user in the credential field.
Select z/OS User, the credential you created in a previous step, in Credentials.
Select Non verifying Verification Strategy in Host Key Verification Strategy because this is a test environment. However, bear in mind that in a production environment, you must select Known hosts file Verification Strategy for security reasons.
Click Advanced to specify the following advanced parameters:
Keep the default value, 22, in Port. However, if your z/OS ssh port is different, you must change this value.
Note: If you want to target a Wazi sandbox, you can retrieve this information from the Wazi Sandbox OpenShift services.Enter
/usr/lpp/java/J8.0_64/bin/java
in JavaPath. This is where the Java binary files are installed.Enter
-Xquickstart -Dfile.encoding=UTF-8 -Xnoargsconversion
in JVM Options.Enter the following command in Prefix Start Agent Command:
. /usr/lpp/IBM/dbb/conf/gitenv.sh && export JAVA_HOME=/usr/lpp/java/J8.0_64 && export IBM_JAVA_ENABLE_ASCII_FILETAG=ON && export GIT_CONFIG_NOSYSTEM=0 && export GIT_SSL_NO_VERIFY=true && env &&
Note: The
gitenv.sh
script is shipped with IBM Dependency Based Build (DBB) and must be adapted to your targeted z/OS environment. More information on DBB can be found in the IBM Dependency Based Build Documentation.Enter
-text
(with a white space at the beginning) in Suffix Start Agent Command.
Click Save to save the agent configuration. The agent starts automatically.