0.2.5 • Published 6 months ago

@ibm/ibmi-ci v0.2.5

Weekly downloads
-
License
Apache 2
Repository
-
Last release
6 months ago

ibmi-ci

ibmi-ci is a command line tool to make it easier to work with IBM i from pipelines, like GitHub Actions, GitLab CICD, etc.

Installation

Read about installing packages from GitHub.

How to use

After installation, run ici to see the help text and available parameters.

ibmi-ci is made up of steps and steps are built up from parameters, with the default step of connecting to the remote system, which always takes a place.

The steps ici will take is based on the parameters used on the CLI. For example:

ici \
  --rcwd "./builds/myproject" \
  --push "." \
  --cmd "/QOpenSys/pkgs/bin/gmake BIN_LIB=MYLIB"

This command will run 3 steps:

  1. Set the remote working directory to ./builds/myproject
  2. Upload the local working directory to the remote working directory (.)
  3. Run a shell command

Default steps

By default, ibmi-ci will always:

  1. Connect to the remote IBM i via SSH. Connection configuration is based on environment variables. Use ici to see more info.
  2. Set the environment variables on the remote IBM i to those of the host runner (with some exceptions like SHELL, HOME, etc)

Ignoring errors

You can use a special ignore flag to suppress errors on certain steps: --ignore. This means if the following step errors, execution will continue nonetheless.

ici \
  --rcwd "./builds/myproject" \
  --push "." \
  --ignore --cl "CRTLIB $LIB"
  --cmd "/QOpenSys/pkgs/bin/gmake BIN_LIB=MYLIB"

Development

After cloning the repo, there are two options:

  1. npm run local to install ici
  2. Open in VS Code and debug

Todo ✅

  • Step for creating chroot automatically as the first step, or to specify which chroot to use
  • Ignore errors for certain steps. Sometimes we don't care if mkdir or CRTLIB failed.
  • Daemon mode so ici can be run multiple times but use the same connection
0.2.5

6 months ago

0.2.4

6 months ago

0.2.3

6 months ago

0.2.2

6 months ago