Skip to main content
Skip table of contents

Jenkins

The Delphix Plugin for Jenkins enables teams to integrate the Delphix DevOps Data Platform within their automated pipelines. With Jenkins and Delphix, customers can automatically provision and destroy ephemeral data environments quickly to improve automated testing and automatically resolve common IT requests. Teams that successfully integrate the solution within their pipelines have experienced improved application quality, faster delivery cycles, and ultimately happier teams and customers. The plugin leverages the Data Control Tower (DCT)’s APIs to communicate with the Delphix Engines.

Common Use Cases

  1. Provision an Oracle database and send the connectivity information to a Quality Assurance team member via email, Slack, or Teams.

  2. Provision a PostgreSQL database, attach a test Application, run a Selenium or JUnit testing plan, report the results, and then destroy the database.

  3. Provision Oracle and MySQL databases simultaneously to complete manual integration testing.

  4. Destroy all Microsoft SQL Server databases each Friday at 5 p.m.

Getting Started 

Follow the below steps to configure and install the Delphix Plugin for Jenkins. Visit the Jenkins Plugins Index for additional information.

Prerequisites

  • Jenkins or CloudBees CI v2.346.1 and greater

  • Install the Delphix Plugin

    • Log in to the Jenkins Server, navigate to Manage Jenkins > Plugins > Available Plugins, search for Delphix Plugin, and install. 

    • Plugin upgrades are performed similarly from the Jenkins Server’s Updates tab.

  • Data Control Tower v7.0.1 and greater with one or more connected Delphix Continuous Data Engines v6.0.14.2 and greater.

Usage

Follow the below sections to configure a simple Jenkins job from scratch.

Global Configuration

After the plugin has been installed, DCT will need to be connected. Go to Manage Jenkins > System, scroll down to the Delphix section, and enter your DCT URL. This URL will be automatically used for every plugin step on the Jenkins server.

Uncheck the Disable SSL Certification Validation checkbox if the DCT server has an insecure SSL Certificate. We do not recommend this for production usage.

jenkins.png

Credentials

The Delphix Plugin uses an API Key to run commands against the DCT server. We recommend granting this key access to only the Objects and Actions that it requires, using the Principle of Least Privilege. The API Key is created and managed directly within the DCT server. More information can be found in DCT’s documentation.

Once the DCT API Key has been generated and configured, it should be saved on the Jenkins server as a Secret text. In Jenkins, go to Credentials > Global, and select Add Credentials. Here you can define your Secret text Credentials. From the dropdown, select the “Secret text” Kind, and fill in the input fields. Specify the DCT’s API Key in the “Secret” field’s value which takes the form “apk 1.xyz…”. Ensure you record the ID’s value as it will be used to retrieve the underlying API Key dynamically. More information can be found in Jenkins’ Credentials documentation.

More than one set of API Keys can be specified within your Jenkins server. Simply call the desired Credential ID in your Jenkins jobs. We recommend creating keys for specific teams, individuals, or purposes.

Plugin Steps

We offer a handful of steps in the Delphix plugin. All steps can be configured through the Freestyle Project UI builder or Pipeline scripting.

  • Provision VDB From Snapshot (provisionVDBFromSnapshot) - Create an Oracle, Microsoft SQL Server, PostgreSQL, and other databases from a Delphix Snapshot.

  • Provision VDB From Bookmark (provisionVDBFromBookmark)- Create an Oracle, Microsoft SQL Server, PostgreSQL, and other databases from a Data Control Tower Bookmark.

  • Delete VDB (deleteVDB) - Shut down and destroy a provisioned VDB.

All steps leverage DCT APIs. Many advanced properties can be configured by identifying the matching DCT API and specifying the values in the Additional Values field.

Advanced Settings

  • Jenkinsfile Script - All steps can be run through the Jenkins pipeline. We highly recommend using the Snippet Generator to help construct your commands. Below, we’ve presented a few samples to help you get started. 

    • Provision VDB from Bookmark Example

      CODE
      provisionVDBFromBookmark  name: 'BMKSAMP', bookmarkId: '<Input Bookmark ID>', autoSelectRepository: true, credentialId: '<Input DCT Key 1.abc1234567890>'
    • Provision VDB From Bookmark and dynamically resolve API Key Example

      CODE
      withCredentials([string(credentialsId: 'DCT_API_KEY', variable: 'KEY')]) {
             provisionVDBFromBookmark  name: 'KEYSAMP', bookmarkId: '<Input Bookmark ID>', autoSelectRepository: true, credentialId: '${KEY}',
      }
    • Provision VDB From dSource Example

      CODE
      provisionVDBFromSnapshot  name: 'dSrcSAMP', sourceDataId: '<Input dSource ID>', autoSelectRepository: true, credentialId: '<Input DCT Key 1.abc1234567890>'
  • Properties File - This file allows the sharing of values between build steps. The provision operation has its output saved in a properties file, and the name of this file can be updated to maintain the state of multiple provision operations within a single Jenkins job. The Delete VDB step can call upon this properties file automatically. Additional details about Properties File usage can be found in this video.

    • Delete VDB From Properties File Example

CODE
deleteVDB loadFromProperties: true, credentialId: '<Input DCT Key 1.abc1234567890>'

Limitations

We have experienced occasional SocketTimeout errors when running a provision step. This issue can be mitigated by either specifying an Engine ID or ensuring all Delphix Continuous Data Engines connected to DCT are online.

Support

The Delphix Plugin support is included within your standard Delphix License Agreement. For any questions, bugs, or feature requests, contact us via Delphix Support or the Delphix Community Portal.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.