Appearance
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:
- setup-reliza-cli: This action, sets up the RelizaHub CLI, reliza-cli, on GitHub's hosted Actions runners.
- reliza-get-version: This action, uses the RelizaHub CLI, reliza-cli, to get the version for current release.
- 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
- 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.
Authorize Reliza Hub for your GitHub Repository via https://github.com/apps/reliza-hub
After authorizing Reliza Hub, note installation ID as shown below:
In Reliza Hub, make sure you register your VCS repository via VCS menu item and plus-circle icon.
In Reliza Hub, open your component and click on tool icon to toggle component settings:
Under "CI Integrations" table, click on the plus-circle icon to add integration.
Choose GitHub Actions as your CI Provider.
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).
Enter GitHub Installation Id noted above in the GitHub App Installation Id field.
Toggle Active? checkbox if you want this integration to auto-fire on events selected below (Note: you can do this later).
Set CI Repository to match your actual repository in Reliza Hub.
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).
Click on Save CI Integration.
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.
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:
- On-demand builds on GitHub Actions with Reliza
- Building Kubernetes CICD pipeline with GitHub Actions, ArgoCD and Reliza Hub
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
On Jenkins side, install Build Authorization Token Root plugin - https://plugins.jenkins.io/build-token-root/
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.
Note: To generate token you may use the following CLI command:
openssl rand 32 | base64
- 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.
In Reliza Hub, open your component and click on tool icon to toggle component settings:
Under "CI Integrations" table, click on the plus-circle icon to add integration.
Choose Jenkins as your CI Provider.
Input final Jenkins URI from step 3 into the Jenkins URI (ends with token=) field.
Input your generated Jenkins Token into Jenkins Token field.
Toggle Active? checkbox if you want this integration to auto-fire on events selected below (Note: you can do this later).
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).
Click on Save CI Integration.
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.
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
- Go to Slack api page at https://api.slack.com/apps and click on "Create New App"
- Name your app "Reliza Hub" and select your Slack workspace in the "Development Slack Workspace"
- Click on "Create App"
- Click on "Incoming Webhooks"
- Click on the toggle "Activate Incoming Webhooks" to change it to "On"
- Scroll down to the bottom of the page
- Click on "Add New Webhook to Workspace"
- On the next screen, select desired Slack channel for integration
- Scroll down to the bottom of the page
- Click "Copy" where it says "Webhook URL"
- You would get a URL like https://hooks.slack.com/services/T0XXXXXXXX/XXXXXXXXX/XXXXXXXXXXXX
- 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
- In Reliza Hub, open Settings from the menu on the left
- In the Integrations section, click on "Add Slack Integration" button
- In the secret field paste the webhook secret you obtained when adding App to slack above - in this tutorial T0XXXXXXXX/XXXXXXXXX/XXXXXXXXXXXX
- Click "Submit"
- Your Slack Integration is now set up!
Microsoft Teams
1. Create Webhook on Teams
- Follow official documentation to create Incoming Webhook on Microsoft Teams.
- Copy Incoming Webhook URI, starting with "https://".
2. Register MS Teams Webhook With Reliza Hub
- In Reliza Hub, open Settings from the menu on the left
- In the Integrations section, click on "Add MS Teams Integration" button
- In the secret field paste the webhook URI you obtained above
- Click "Submit"
- 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