Reliza Integration

ID: reliza-integration

Plugin use

Plugin integrates itself with Reliza Hub (, allowing you to automatically set new releases through your Jenkinsfile. More information on how to use Reliza Hub here

Setting Reliza Hub credentials

For the plugin to interact with Reliza Hub you will need to set up credentials on your Jenkins instance.

Acquiring api key and id

Project API: Go to Reliza Hub -> project -> project you wish to integrate -> click on padlock -> record given api key and id

OR Org API (will require project ID): Go to Reliza Hub -> settings -> set org-wide read-write api key -> record given api key and id

Project ID (if using Org API): Go to Reliza Hub -> project -> project you wish to integrate -> click on wrench -> record UUID

Storing in Jenkins

Go to Jenkins instance -> Manage Jenkins -> Manage Credentials -> Domains: (global) -> Add Credentials

Kind should be set to Username with password and scope should be set to global.

Input your api key id into username and api key into password, then set identifying ID to "RELIZA_API", description can be anything.

Example Jenkinsfile/Pipeline usage

pipeline {
    agent {
        kubernetes {
            yaml """
apiVersion: v1
kind: Pod
    run: jenkins-slave
  - name: dind
    image: docker:19.03.12-dind
    - cat
    - mountPath: /var/run/docker.sock
      name: dockersock
    tty: true
  - name: dockersock
      path: /var/run/docker.sock
    environment { RELIZA_API = credentials('RELIZA_API') }
    stages {
        stage('Build and Deploy') {
            steps {
                withReliza(uri: '', 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
                                    DOCKER_SHA_256=$(docker images --no-trunc --quiet relizatest/throw:latest)
                                env.DOCKER_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")
  1. Credentials set beforehand in Jenkins instance are set as environment variables for plugin to read.

  2. withReliza wrapper is called with three optional parameters uri, projectId, and onlyVersion. uri is defaulted to, projectId is only required if using ORG wide API, and onlyVersion is for the ability to only create version info and skip the release. Wrapper will call Reliza Hub to get new version to be released.

  3. Jenkinsfile reads from repository Dockerfile to build the image and push to Docker Hub, then sets environment variables for the plugin to read and send to Reliza Hub.

  4. If build fails, status is set to rejected for sending release metadata.

  5. addRelizaRelease method can only be called within Reliza wrapper and will send release details to Reliza Hub. Method has one optional parameter artId (image name) which is only required when building an image.

Resources on pipelines and writing plugins


Version 0.1.2 (Feb 23, 2021)

  • Added onlyVersion flag for getVersion call
  • Added plugin description

Version 0.1.1 (Feb 17, 2021)

  • Modified plugin display

Version 0.1.0 (Feb 12, 2021)

  • Initial Release
ArchivesGet past versions
Version: 0.1.2
Requires Jenkins 2.263.1
Installs: No usage data available
Help us improve this page!
To propose a change submit a pull request to the plugin page on GitHub.