Enabling Git integration for asset promotion

If you have multiple instances of IBM Software Hub, you can use a web-based Git repository to manage assets across instances. For example, you can use GitHub to promote governance rules from your development instance to your staging instance to ensure that the assets are the same on both environments.

Who needs to complete this task?

Instance administrator An instance administrator can complete this task.

When do you need to complete this task?

Complete this task on each instance of IBM Software Hub that you want to integrate with Git.

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

About this task

You can use the following web-based Git repositories with IBM Software Hub:

  • GitHub
  • GitHub Enterprise
  • GitLab
  • GitLab Self-Managed
The following services support asset promotion with Git:
  • Data Virtualization
  • IBM Knowledge Catalog
  • IBM Knowledge Catalog Premium
  • IBM Knowledge Catalog Standard

Procedure

To enable IBM Software Hub to integrate with web-based Git repositories:

Edit the zenservice custom resource to set the zen_gitops_enabled parameter to true:

The command that you run depends on the type of TLS certificate that you use to secure your repository:


No TLS certificate
oc patch zenservice lite-cr \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch '{"spec": {"zen_gitops_enabled":true}}'

CA signed certificate
oc patch zenservice lite-cr \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch '{"spec": {"zen_gitops_enabled":true}}'

Self-signed certificate
oc patch zenservice lite-cr \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch '{"spec": {"zen_gitops_enabled":true, "zen_gitops_tls_tolerate_private_ca":true}}'

Results

After you configure IBM Software Hub to integrate with Git, the following permissions are added to the platform:

  • Push to Git
  • Sync from Git

What to do next

Add the Push to Git permission and the Sync from Git permission to user roles.

  • Assign the role with the Push to Git permission to users on instances where users are making changes and need to be able to push the changes to the remote repository.
  • Assign the role with the Sync from Git permission to users on instances where users need to pull the latest changes from the remote repository.