Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jenkinsci/delphix-plugin

Integrate the Delphix DevOps Data Platform with Jenkins CI/CD pipelines
https://github.com/jenkinsci/delphix-plugin

automation delphix jenkins jenkins-plugin

Last synced: 2 months ago
JSON representation

Integrate the Delphix DevOps Data Platform with Jenkins CI/CD pipelines

Awesome Lists containing this project

README

        

# Delphix Plugin for Jenkins

[![Build Status](https://ci.jenkins.io/buildStatus/icon?job=Plugins/delphix-plugin/master)](https://ci.jenkins.io/job/Plugins/job/delphix-plugin/)
[![Jenkins Plugins](https://img.shields.io/jenkins/plugin/v/delphix.svg)](https://plugins.jenkins.io/delphix)
[![License](https://img.shields.io/github/license/jenkinsci/delphix-plugin.svg)](LICENSE)

The Delphix Plugin for Jenkins allows Jenkins to connect to Delphix DevOps Data Platform(s) and execute data operations using the Data Control Tower (DCT) APIs.

#### Table of Contents
1. [Introduction](#Introduction)
2. [Installation](#installation)
3. [Pre-Requisites](#requirements)
4. [Usage](#usage)
5. [Links](#links)
6. [Contribute](#contribute)
* [Code of conduct](#code-of-conduct)
* [Community Guidelines](#community-guidelines)
* [Contributor Agreement](#contributor-agreement)
7. [Reporting Issues](#reporting-issues)
8. [Statement of Support](#statement-of-support)
9. [License](#license)

## Introduction

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 who 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.

### Example Use Cases
- Provision an Oracle database and send the connectivity information to a Quality Assurance team member via email, Slack, or Teams.
- Provision a PostgreSQL database, attach a test Application, run a Selenium or JUnit testing plan, report the results, and then destroy the database.
- Provision Oracle and MySQL databases simultaneously to complete manual integration testing.
- Destroy all Microsoft SQL Server databases at a specific time on a specific day every, week.

## Installation

Install through Jenkins Plugin Manager or download [here](https://plugins.jenkins.io/delphix).
> **WARNING:**
>The v3.0.0+ versions of the Delphix Plugin leverage Delphix's Data Control Tower APIs which is a different approach from prior versions. There is no supported upgrade path from v1.x and v2.x to v3.x+

## Pre-Requisites

- Jenkins server or CloudBees CI v2.346.1 and greater
- Delphix Data Control Tower v7.0.1 or greater
- One or more connected Delphix Continuous Data Engines v6.0.14.2 or greater.
[Consult our DCT documentation for more information](https://dct.delphix.com/docs).

## Usage

#### **Global Configuration**

After the plugin has been installed, DCT will need to be connected. Go to Manage Jenkins > Configure 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.

Select the `Disable SSL certificate check` checkbox if the DCT server has an insecure SSL Certificate.

*We recommend configuring your DCT server with an SSL certificate for production usage.

![Alt text](images/updated_configuration.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.

[More information can be found in DCT’s documentation](https://dct.delphix.com/docs).

The API KEY has to be saved on Jenkins’s side as a Secret text. In Jenkins, go to Credentials > Global > Add Credentials, select the Secret text type, and fill in the inputs

![Alt text](images/credentials.png)

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) - Shutdown and destroy a provisioned VDB.

![Alt text](images/build_step.png)

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**
It is possible to share assets created between build steps. The provision operation has its output saved in a properties file.

* Jenkinsfile Script - All steps can be run through the Jenkins pipeline. We highly recommend using the [Snippet Generator] (https://www.jenkins.io/doc/book/pipeline/getting-started/#snippet-generator) to help construct your commands. Below we’ve presented a few samples to help you get started.

Provision VDB from Bookmark Example:-

```
provisionVDBFromBookmark name: 'BMKSAMP', bookmarkId: '', autoSelectRepository: true, credentialId: ''
```

Provision VDB From Bookmark and dynamically resolve API Key Example:-

```
withCredentials([string(credentialsId: 'DCT_API_KEY', variable: 'KEY')]) {
provisionVDBFromBookmark name: 'KEYSAMP', bookmarkId: '', autoSelectRepository: true, credentialId: '${KEY}',
}
```

Provision VDB From dSource Example:-
```
provisionVDBFromSnapshot name: 'dSrcSAMP', sourceDataId: '', autoSelectRepository: true, credentialId: ''
```

* Properties File - This file allows the sharing values between build steps. The provision operation has its output saved in a properties file and the name this file can be updated to maintain multiple 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] (https://www.youtube.com/watch?v=qQS7Idaq_ME).

Delete VDB From Properties File Example:-

```
deleteVDB loadFromProperties: true, credentialId: ''
```

## Links

* [Delphix Ecosystem Documentation](https://ecosystem.delphix.com/docs/main/jenkins)
* [Jenkins Plugin Site Page](https://plugins.jenkins.io/delphix)

## Contribute

1. Fork the project.
2. Make your bug fix or new feature.
3. Add tests for your code.
4. Send a pull request.

Contributions must be signed as `User Name `. Make sure to [set up Git with user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup). Bug fixes should branch from the current stable branch. New features should be based on the `master` branch.

#### Code of Conduct

This project operates under the [Delphix Code of Conduct](https://delphix.github.io/code-of-conduct.html). By participating in this project you agree to abide by its terms.

#### Contributor Agreement

All contributors are required to sign the Delphix Contributor agreement prior to contributing code to an open source repository. This process is handled automatically by [cla-assistant](https://cla-assistant.io/). Simply open a pull request and a bot will automatically check to see if you have signed the latest agreement. If not, you will be prompted to do so as part of the pull request process. Read the full [Delphix Contributor License Agreement](https://delphix.github.io/contributor-agreement.html).

## Statement of Support

Delphix Plugin for Jenkins support is included within the standard Delphix License Agreement. For any questions, bugs, or feature requests, contact us via [Delphix Support](https://support.delphix.com/) or the [Delphix Community Portal](https://community.delphix.com/home).

All users can submit bug reports, suggestions, and pull requests to the [GitHub issue tracker](https://github.com/jenkinsci/delphix-plugin/issues).

## License

This is code is licensed under the Apache License 2.0. Full license is available [here](./LICENSE).