Skip to content
On this page

Reliza Hub Integrations

Reliza CLI

We prepared Reliza CLI project which is open sourced and can be found at https://github.com/relizaio/reliza-cli. Documentation can be found in the same repository.

This project provides variety of common integration scenarios with Reliza Hub and can be used in any home-made or 3rd party tool. Easiest way to use Reliza CLI is via its docker image relizaio/reliza-cli.

CI Integrations

GitHub Actions

1. Build and push Docker image on GitHub Actions

Sample GitHub Actions YAML workflow to build and push docker image and submit metadata to Reliza Hub (used in getting started tutorial): https://github.com/relizaio/reliza-hub-integrations/blob/master/github-actions/dockerBuild.yml.

The sample YAML workflow uses the reliza-docker-action available on github marketplace.

This GitHub Action also supports AWS ECR repositories - simply pass your IAM ID and Key as registry_username and registry_password parameters.

2. Version, package and release Helm Chart on GitHub Actions

Sample GitHub Actions YAML workflow to version, package and release a helm chart and then submit metadata to Reliza Hub: https://github.com/relizaio/reliza-hub-integrations/blob/master/github-actions/helmVersionAndPublish.yml.

The sample YAML workflow uses the reliza-helm-action available on github marketplace.

3. Other Reliza Github Actions

The reliza-docker-action and the reliza-helm-action action reuses the following actions (also available on github marketplace), which can be reused to create other custom workflows:

  1. setup-reliza-cli: This action, sets up the RelizaHub CLI, reliza-cli, on GitHub's hosted Actions runners.
  2. reliza-get-version: This action, uses the RelizaHub CLI, reliza-cli, to get the version for current release.
  3. reliza-add-release: This action, uses the RelizaHub CLI, reliza-cli, to submit the release metadata.

3. Add integration on Reliza Hub Events to Trigger GitHub Actions

  1. Create a GitHub Actions script in your repository which would fire on repository dispatch event, i.e.
on:
  repository_dispatch:
    types: [reliza-build-event]

See sample script here.

  1. Authorize Reliza Hub for your GitHub Repository via https://github.com/apps/reliza-hub

  2. After authorizing Reliza Hub, note installation ID as shown below:

Extract Reliza Hub Installation ID from GitHub

  1. In Reliza Hub, make sure you register your VCS repository via VCS menu item and plus-circle icon.

  2. In Reliza Hub, open your project and click on tool icon to toggle project settings: Toggle Project Settings in Reliza Hub UI

  3. Under "CI Integrations" table, click on the plus-circle icon to add integration.

  4. Choose GitHub Actions as your CI Provider.

  5. Leave Name of GitHub Actions Event blank to use default event "reliza-build-event" or use your custom event (note that this event must match GitHub Action yaml in your actual repository).

  6. Enter GitHub Installation Id noted above in the GitHub App Installation Id field.

  7. Toggle Active? checkbox if you want this integration to auto-fire on events selected below (Note: you can do this later).

  8. Set CI Repository to match your actual repository in Reliza Hub.

  9. If you want to customize trigger events, uncheck ANY checkbox and pick your custom events (release created or specific approvals - as defined per your approval matrix).

  10. Click on Save CI Integration.

  11. You'll see your new integration in the CI Integrations table. Click on Play icon in the manage section to trigger integration and verify that the build starts on your GitHub Actions repository.

  12. If your integration is Active and event triggers are set properly, your integration will now auto-fire on triggered events.

Read more in the following 2 articles:

GitLab CI

1. Build and push Docker image on GitLab CI

Sample GitLab CI YAML workflow to build and push docker image and submit metadata to Reliza Hub can be found here: https://github.com/relizaio/reliza-hub-integrations/tree/master/GitLab.

2. Add integration on Reliza Hub Events to Trigger GitLab CI Schedules

See detailed instructions and sample in our sample-helm-cd repository

CircleCI

1. Build and push Docker image on CircleCI

Sample CircleCI YAML workflow to build and push docker image and submit metadata to Reliza Hub can be found here: https://github.com/relizaio/reliza-hub-integrations/tree/master/CircleCI.

2. Add integration on Reliza Hub Events to Trigger CircleCI builds

Coming soon.

Azure DevOps

1. Build and push Docker image on Azure DevOps

Sample Azure DevOps YAML workflow to build and push docker image and submit metadata to Reliza Hub can be found here: https://github.com/relizaio/reliza-hub-integrations/blob/master/AzureDevOps/azureDevOpsBuildPush.yaml.

2. Add integration on Reliza Hub Events to Trigger Azure DevOps builds

Coming soon.

Jenkins

1. Our Jenkins Plugin is now available: https://plugins.jenkins.io/reliza-integration/

Sample Jenkinsfile (for Jenkins running on k8s) using Reliza Integration plugin to build docker image and submit metadata to Reliza Hub:

pipeline {
    agent {
        kubernetes {
            yaml """
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: jenkins-slave
spec:
  containers:
  - name: dind
    image: docker:19.03.12-dind
    command:
    - cat
    volumeMounts:
    - mountPath: /var/run/docker.sock
      name: dockersock
    tty: true
  volumes:
  - name: dockersock
    hostPath:
      path: /var/run/docker.sock
"""
        }
    }
    environment { RELIZA_API = credentials('RELIZA_API') }
    stages {
        stage('Build and Deploy') {
            steps {
                withReliza(uri: 'https://test.relizahub.com', onlyVersion: 'true') {
                    script {
                        try {
                            env.COMMIT_TIME = sh(script: 'git log -1 --date=iso-strict --pretty="%ad"', returnStdout: true).trim()
                            container('dind') {
                                sh '''
                                    docker build -t relizatest/throw .
                                    docker login -u USERNAME -p PASSWORD
                                    docker push relizatest/throw
                                    SHA_256=$(docker images --no-trunc --quiet relizatest/throw:latest)
                                '''
                                env.SHA_256 = sh(script: 'docker images --no-trunc --quiet relizatest/throw:latest', returnStdout: true)
                            }
                        } catch (Exception e) {
                            env.STATUS = 'rejected'
                            echo 'FAILED BUILD: ' + e.toString()
                        }
                        addRelizaRelease(artId: "relizatest/throw", artType: "Docker")
                    }
                }
            }
        }
    }
}

2. Add integration on Reliza Hub Events to Trigger Remote Jenkins build

  1. On Jenkins side, install Build Authorization Token Root plugin - https://plugins.jenkins.io/build-token-root/

  2. On Jenkins side, in the Build Triggers section of your job check Trigger builds remotely (e.g. from scripts) and paste random alphanumeric sequence into the Authentication Token field.

Build Triggers in Jenkins

Note: To generate token you may use the following CLI command:

openssl rand 32 | base64
  1. Under the Authentication Token section notice the url that Jenkins will print out to trigger this build remotely. Copy that url and modify it to match Build Authorization plugin format.

Example: if your Jenkins host is https://my.jenkins and Jenkins gives you the following URI:

JENKINS_URL/job/Test%20pipeline/build?token=TOKEN_NAME

the final URI you are looking for is

https://my.jenkins/buildByToken/build?job=Test%20pipeline&token=

! Important: Do not include your actual token in the URL, it would go in a separate field on Reliza Hub side.

  1. In Reliza Hub, open your project and click on tool icon to toggle project settings: Toggle Project Settings in Reliza Hub UI

  2. Under "CI Integrations" table, click on the plus-circle icon to add integration.

  3. Choose Jenkins as your CI Provider.

  4. Input final Jenkins URI from step 3 into the Jenkins URI (ends with token=) field.

  5. Input your generated Jenkins Token into Jenkins Token field.

  6. Toggle Active? checkbox if you want this integration to auto-fire on events selected below (Note: you can do this later).

  7. If you want to customize trigger events, uncheck ANY checkbox and pick your custom events (release created or specific approvals - as defined per your approval matrix).

  8. Click on Save CI Integration.

  9. You'll see your new integration in the CI Integrations table. Click on Play icon in the manage section to trigger integration and verify that the build starts on your Jenkins.

  10. If your integration is Active and event triggers are set properly, your integration will now auto-fire on triggered events.

CD Integrations

ArgoCD

Read how to build our sample ArgoCD integration in the following article: Building Kubernetes CICD pipeline with GitHub Actions, ArgoCD and Reliza Hub

Platform Integrations

Kubernetes

Use following instructions to add Reliza Client Watcher on your Kubernetes instance to track deployments registered on Reliza Hub: https://github.com/relizaio/reliza-hub-integrations/tree/master/kubernetes. Note that currently this would only show deployments with metadata previously tracked on Reliza Hub.

Google App Engine

Read how to build full pipeline deploying to Google App Engine using GitHub Actions and Reliza Hub here: https://worklifenotes.com/2020/05/24/google-app-engine-github-actions-static-websites/.

Monitoring Integrations

Slack

1. Add App To Slack

  1. Go to Slack api page at https://api.slack.com/apps and click on "Create New App"
  2. Name your app "Reliza Hub" and select your Slack workspace in the "Development Slack Workspace"
  3. Click on "Create App"
  4. Click on "Incoming Webhooks"
  5. Click on the toggle "Activate Incoming Webhooks" to change it to "On"
  6. Scroll down to the bottom of the page
  7. Click on "Add New Webhook to Workspace"
  8. On the next screen, select desired Slack channel for integration
  9. Scroll down to the bottom of the page
  10. Click "Copy" where it says "Webhook URL"
  11. You would get a URL like https://hooks.slack.com/services/T0XXXXXXXX/XXXXXXXXX/XXXXXXXXXXXX
  12. Copy everything after https://hooks.slack.com/services/, in the case above this would be T0XXXXXXXX/XXXXXXXXX/XXXXXXXXXXXX (note that this is your Slack webhook secret so treat it accordingly)

2. Register Slack App With Reliza Hub

  1. In Reliza Hub, open Settings from the menu on the left
  2. In the Integrations section, click on "Add Slack Integration" button
  3. In the secret field paste the webhook secret you obtained when adding App to slack above - in this tutorial T0XXXXXXXX/XXXXXXXXX/XXXXXXXXXXXX
  4. Click "Submit"
  5. Your Slack Integration is now set up!

Microsoft Teams

1. Create Webhook on Teams

  1. Follow official documentation to create Incoming Webhook on Microsoft Teams.
  2. Copy Incoming Webhook URI, starting with "https://".

2. Register MS Teams Webhook With Reliza Hub

  1. In Reliza Hub, open Settings from the menu on the left
  2. In the Integrations section, click on "Add MS Teams Integration" button
  3. In the secret field paste the webhook URI you obtained above
  4. Click "Submit"
  5. Your Microsoft Teams Integration is now set up!

Integration with Ticketing systems

Jira

Jira integration with Reliza Hub provides more context on releases by linking them with issues on Jira.
It allows for releases to be searched by Jira ticket number.

To integrate go to settings and click on add Jira Integration. This will trigger authentication flow with your Jira instance.

Integration with Cyber-Security Tools

CycloneDX SBOM

Note: CycloneDX support is a work in progress, more functionality is coming soon - check this page for updates.

1. Exporting Release in CycloneDX SBOM format

To export a release in CycloneDX SBOM XML format, note Release UUID and navigate to https://app.relizahub.com/api/manual/v1/release/exportAsBom/{releaseUuid}

2. Export Instance State in CycloneDX SBOM format

This functionality is coming soon.

3. Injest CycloneDX SBOM

This functionality is coming soon.

4. Information about CycloneDX project

Learn more about CycloneDX project on its official website: https://cyclonedx.org