Install GitLab Runner manually on z/OS

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

GitLab Runner for IBM z/OS has been certified by GitLab and can run CI/CD jobs natively on z/OS mainframe environments.

You can download and install GitLab Runner on z/OS manually from a pax archive.

Prerequisites

  • To use GitLab Runner, you need the following authorized program analysis reports (APARs) with program temporary fixes (PTFs):

    • z/OS 2.5
      • OA62757
      • PH45182
    • z/OS 3.1
      • OA62757
      • PH57159
  • GitLab Runner expects bash to be installed at /bin/bash to execute shell commands. If bash is not installed at this location, create a symlink to the installed version:

    ln -s <TARGET_BASH> /bin/bash

Install GitLab Runner

To install GitLab Runner:

  1. Download the paxfile into your chosen install directory.

  2. Install the package for your system:

    pax -ppx -rf gitlab-runner-<VERSION>.pax.Z

    The installed files are unpacked to the gitlab-runner directory in the install location.

  3. Give the file permissions to execute:

    chmod +x <INSTALL_PATH>/bin/gitlab-runner
  4. Export GitLab Runner and add it to your PATH:

    export GITLAB_RUNNER=<INSTALL_PATH>/gitlab-runner/bin
    export PATH=${GITLAB_RUNNER}:${PATH}
  5. Register a runner.

Run GitLab Runner

You can run GitLab Runner directly or as a started task.

Run GitLab Runner directly

To run GitLab Runner by calling the executable:

  1. Go to the directory <INSTALL_PATH>/bin.

  2. Start the service:

    gitlab-runner start

Run GitLab Runner as a started task

To keep the GitLab Runner process available, run it as a started task.

  1. Wrap the executable in a shell script gitlab-runner.sh:

    #! /bin/sh
    <INSTALL_PATH>/bin/gitlab-runner start
  2. Define a jcl started task program and execute it to run as an ongoing process:

    //GLRST  PROC CNFG='<PATH_TO_SCRIPT>'
    //*
    //GLRST  EXEC PGM=BPXBATSL,REGION=0M,TIME=NOLIMIT,
    //            PARM='PGM &CNFG./gitlab-runner.sh'
    //STDOUT   DD SYSOUT=*
    //STDERR   DD SYSOUT=*
    //*
    //        PEND