Checking your z/OS Connect API project into source control

Source Control Management (SCM) is an invaluable tool for modern software development and forms the basis for modern DevOps and CI/CD pipelines in z/OS Connect and cloud-native development.

What is Source Control Management and why is it important?

SCM is used to track changes to a project's code base and helps to prevent conflicts. It is recommended that SCM is used when developing z/OS Connect APIs. If a conflict occurs, SCM is used to resolve it.

As projects grow in complexity and the number of developers involved increases, there needs to be increased communication and management to meet the demands of the project. SCM is essential to ensure a well-maintained and protected code base.

Popular SCMs include:
  • Git
  • Subversion
  • Engineering Workflow Management
Advantages of using a Source Control Management solution include:
  • Change version history.
  • Auditing.
  • Valuable record keeping for project release notes.
  • Reduce communication complexity.
  • Troubleshoot easily and pinpoint when and where bugs or issues were introduced to the code base.
  • Enable developers to work independently on the same code base.
  • Isolate potentially damaging changes.

DevOps in z/OS Connect

As Developers make changes in the z/OS Connect Designer, these changes are updated on the file system in the API Project that was mounted. These files are the source code for your API and should be checked into SCM. The API source is then available to anyone who needs to make future updates and the most recent version is always used for deployment.

It is recommended that the API Project folder should be an SCM controlled directory so changes are tracked. When the API Project is first created (by importing the OpenAPI 3.0 definition) in z/OS Connect Designer, an API Project template is created in the API Project folder. This includes a default .gitignore file that is used by Git SCM. The .gitignore file has defaults detailing files and patterns to exclude from the repository and is hidden by default on most operating systems due to starting with a ' . '. It can be used as a reference ignore file when other SCM solutions are used.

Attached to the SCM solution is a DevOps pipeline of familiar enterprise tools that use a z/OS Connect API project in a build process to create an API container image.

This API container image is used through development, staging, test, user acceptance testing (UAT), pre-production and eventually deploying to a live production environment.

Figure 1. A z/OS Connect API Project in a DevOps pipeline
A z/OS Connect API Project in a DevOps pipeline