{"id":15501,"date":"2022-01-18T15:30:23","date_gmt":"2022-01-18T20:30:23","guid":{"rendered":"http:\/\/www.iri.com\/blog\/?p=15501"},"modified":"2022-01-18T15:30:23","modified_gmt":"2022-01-18T20:30:23","slug":"db-subsets-in-jenkins-pipeline","status":"publish","type":"post","link":"https:\/\/www.iri.com\/blog\/test-data\/db-subsets-in-jenkins-pipeline\/","title":{"rendered":"Testing with DB Subsets in a Jenkins CI\/CD Pipeline"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">This Jenkins entry is the fourth in a series of articles on the use of <\/span><a href=\"https:\/\/www.iri.com\/solutions\/test-data\"><span style=\"font-weight: 400;\">IRI test data management<\/span><\/a><span style=\"font-weight: 400;\"> software \u2013 that masks, synthesizes, or subsets data \u2013 to feed safe, referentially correct test data for DevOps to CI\/CD environments. Prior articles showed examples of test data creation in IRI software and the use of that data in <\/span><a href=\"https:\/\/www.iri.com\/blog\/test-data\/building-test-data-in-cicd-pipeline\/\"><span style=\"font-weight: 400;\">GitLab<\/span><\/a><span style=\"font-weight: 400;\">, <\/span><a href=\"https:\/\/www.iri.com\/blog\/data-protection\/masked-test-data-in-an-aws-codepipeline\/\"><span style=\"font-weight: 400;\">AWS CodePipeline<\/span><\/a><span style=\"font-weight: 400;\">, and <\/span><a href=\"https:\/\/www.iri.com\/blog\/test-data\/test-data-azure-devops\/\"><span style=\"font-weight: 400;\">Azure DevOps<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this article I will explain how to host Jenkins in a Google Cloud Platform (GCP) Virtual Machine (VM), and run an IRI <\/span><a href=\"https:\/\/www.iri.com\/solutions\/test-data\/db-subsetting\"><span style=\"font-weight: 400;\">database subsetting<\/span><\/a><span style=\"font-weight: 400;\"> job to feed that data into a Jenkins pipeline.\u00a0<\/span><span style=\"font-weight: 400;\">Subsetting produces a smaller, but referentially-correct copy of a larger database schema.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Subsetting is useful in software or database testing scenarios that do not warrant the (size) resources or (privacy) risk of using a copy of a production instance. Subsetting also preserves the business logic required in application testing, and when coupled with data cleansing and masking, the subsets are also sanitized and safe for use.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15507 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkins-example-flow-1024x330.png\" alt=\"\" width=\"698\" height=\"225\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkins-example-flow.png 1024w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkins-example-flow-300x97.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkins-example-flow-768x248.png 768w\" sizes=\"(max-width: 698px) 100vw, 698px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">So how do continuous integration tools like Jenkins benefit users when coupled with test data generation tasks like subsetting? Imagine a scenario where you are regularly building and deploying your application code within a CI\/CD pipeline. If your application consumes data from a database as part of its regular process, that process will need to be included in testing during certain stages of the CI\/CD pipeline.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example, if we need to run tests on a website build that displays users\u2019 recent purchases from an online store, we will inevitably need to include tests related to the website\u2019s ability to query and accurately retrieve data from a database. By integrating a subsetting and masking job into the CI\/CD pipeline, we can create a comprehensive process in which we build and deploy these realistic, protected subsets alongside our application code to provide meaningful test data for use in the testing stages of the application\u2019s CI\/CD pipeline.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This article assumes a certain level of familiarity with Jenkins and the Eclipse IDE, as we will be using the Jenkins Editor in <\/span><a href=\"https:\/\/www.iri.com\/products\/workbench\"><span style=\"font-weight: 400;\">IRI Workbench<\/span><\/a><span style=\"font-weight: 400;\"> \u2013 the IDE for IRI test data and DB operations, etc. In summary, this article will discuss:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Creating a VM Instance and Installing Jenkins<\/span><\/i><span style=\"font-weight: 400;\"> &#8211; we will use GCP to set up our environment and, then we will install Jenkins<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Automating Your Jenkins Pipeline via Webhooks<\/span><\/i><span style=\"font-weight: 400;\"> &#8211; for the sake of automation we need Github to notify the Jenkins server when push events occur<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Creating a Jenkins Pipeline<\/span><\/i><span style=\"font-weight: 400;\"> &#8211; a brief walk through \/ how-to refresher<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Supplying Test Data with DB Subsets<\/span><\/i><span style=\"font-weight: 400;\"> &#8211; an overview of this test data generation method<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Installing Jenkins Editor into IRI Workbench<\/span><\/i><span style=\"font-weight: 400;\"> &#8211; the handy tool for creating Jenkins files<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Creating a Jenkins File &#8211; <\/span><span style=\"font-weight: 400;\">to furnish specific instructions to the pipeline<\/span><\/i><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Configuring the Jenkins Pipeline to Run IRI (Test Data) Jobs<\/span><\/i><span style=\"font-weight: 400;\"> &#8211; showing the Jenkinsfile syntax that instructs our pipeline to run the subsetting (batch) job script<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Triggering the Jenkins Pipeline from IRI Workbench<\/span><\/i><span style=\"font-weight: 400;\"> &#8211; to commit and push our IRI project to Github, and trigger our Jenkins pipeline<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">Summary &#8211; <\/span><span style=\"font-weight: 400;\">a synopsis of the whole process, and the benefits it delivers.<\/span><\/i><\/li>\n<\/ul>\n<h6><b>Creating a VM Instance and Installing Jenkins<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">First, we need to create a VM instance by clicking CREATE INSTANCE in the console panel provided by GCP.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15508 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj1-1024x332.jpg\" alt=\"\" width=\"700\" height=\"227\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj1-1024x332.jpg 1024w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj1-300x97.jpg 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj1-768x249.jpg 768w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj1.jpg 1085w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Next we need to configure the Instance:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15509 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj2.jpg\" alt=\"\" width=\"399\" height=\"532\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj2.jpg 559w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj2-225x300.jpg 225w\" sizes=\"(max-width: 399px) 100vw, 399px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15510 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj3.jpg\" alt=\"\" width=\"400\" height=\"632\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj3.jpg 553w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj3-190x300.jpg 190w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">We next need to enable the firewall to allow HTTP\/S traffic so that the Jenkins server can receive notifications for push events from GitHub (will be discussed later). After you are happy with the settings for the VM instance, click <\/span><i><span style=\"font-weight: 400;\">CREATE<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once the instance is created we can start installing Jenkins and Git on it. That means in the Google Console panel, we need to open the SSH terminal:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15511 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-startssh.png\" alt=\"\" width=\"601\" height=\"269\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-startssh.png 762w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-startssh-300x134.png 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Click on SSH under the Connect section to open a terminal to your instance:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15512 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-installgit.png\" alt=\"\" width=\"600\" height=\"218\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-installgit.png 693w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-installgit-300x109.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">My GCP instance runs Debian (Linux). I entered the following commands to set up Jenkins in it:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">sudo apt-get update<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">sudo apt-get install git<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">sudo apt-get install openjdk-11-jdk<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">curl -fsSL https:\/\/pkg.jenkins.io\/debian-stable\/jenkins.io.key | sudo tee \\<br \/>\n\/usr\/share\/keyrings\/jenkins-keyring.asc &gt; \/dev\/null<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">echo deb [signed-by=\/usr\/share\/keyrings\/jenkins-keyring.asc] \\<br \/>\nhttps:\/\/pkg.jenkins.io\/debian-stable binary\/ | sudo tee \\<br \/>\n\/etc\/apt\/sources.list.d\/jenkins.list &gt; \/dev\/null<br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">sudo apt-get update<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">sudo apt-get install jenkins<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">With this, Jenkins should now be installed on our GCP instance. However, we still cannot access it until we configure the network interface. To do that, go to VM Details, and open <\/span><i><span style=\"font-weight: 400;\">default<\/span><\/i><span style=\"font-weight: 400;\"> under<\/span><i><span style=\"font-weight: 400;\"> Network Interfaces<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15513 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj4-1024x697.jpg\" alt=\"\" width=\"651\" height=\"443\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj4-1024x697.jpg 1024w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj4-300x204.jpg 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj4-768x523.jpg 768w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj4.jpg 1110w\" sizes=\"(max-width: 651px) 100vw, 651px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">In the next window, select the Firewall<\/span><i><span style=\"font-weight: 400;\"> Rules <\/span><\/i><span style=\"font-weight: 400;\">tab and then click on the <\/span><i><span style=\"font-weight: 400;\">Add Firewall Rule <\/span><\/i><span style=\"font-weight: 400;\">button.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15515 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj5.jpg\" alt=\"\" width=\"650\" height=\"391\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj5.jpg 1008w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj5-300x180.jpg 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj5-768x462.jpg 768w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">When creating the firewall rule you will need to specify the port number to be used and the source IP range. In the case of Jenkins, it will be listening by default on port 8080, so it must be specified during the new firewall rule configuration stage.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15516 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj6.jpg\" alt=\"\" width=\"399\" height=\"575\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj6.jpg 577w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-gcpj6-208x300.jpg 208w\" sizes=\"(max-width: 399px) 100vw, 399px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">If you have correctly added the source IP range and port number, you should now be able to access Jenkins from the external IP address provided by your VM instance. <\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15517 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenksuccess.png\" alt=\"\" width=\"645\" height=\"408\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenksuccess.png 908w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenksuccess-300x190.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenksuccess-768x485.png 768w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/p>\n<h6><b>Automating Your Jenkins Pipeline via Webhooks<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">Unless you only want to run your CI\/CD pipeline manually or on a schedule, you will need to configure your Jenkins server to work with webhooks. Specifically, you will need to configure the Jenkins server to listen for push events on your GitHub repository via webhooks.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For those unfamiliar with Jenkins or webhooks, setting up a Jenkins pipeline with webhooks can be tricky. This helpful <\/span><a href=\"https:\/\/www.youtube.com\/watch?v=08Wwof68cxU\"><span style=\"font-weight: 400;\">video<\/span><\/a><span style=\"font-weight: 400;\"> shows how to create webhooks on Github, configure the Jenkins instance to listen for push events, and configure a pipeline that will react to said push events.\u00a0<\/span><\/p>\n<h6><b>Creating a Jenkins Pipeline<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">After creating a user account and installing the default Jenkins plugins during initial setup, you should now be able to create a CI\/CD pipeline. The initial pipeline setup can be seen in the previously shared video, but I will briefly walk through these steps.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">First select <\/span><i><span style=\"font-weight: 400;\">New Item<\/span><\/i><span style=\"font-weight: 400;\"> from the Dashboard page:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15518 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart1.png\" alt=\"\" width=\"650\" height=\"408\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart1.png 981w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart1-300x188.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart1-768x482.png 768w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Next select <\/span><i><span style=\"font-weight: 400;\">Pipeline<\/span><\/i><span style=\"font-weight: 400;\"> as the type of new item and click OK:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15519 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart2.png\" alt=\"\" width=\"649\" height=\"457\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart2.png 972w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart2-300x211.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart2-768x540.png 768w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Now you will begin configuring your newly created pipeline through various lists of options. First, we will want to set the build trigger to utilize <\/span><i><span style=\"font-weight: 400;\">GitHub hook trigger for GITScm polling<\/span><\/i><span style=\"font-weight: 400;\">:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15520 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart3.png\" alt=\"\" width=\"549\" height=\"603\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart3.png 755w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart3-273x300.png 273w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Next, we have to choose whether to configure the new pipeline to use a script located on the Jenkins server or a <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\"> located in the target project\u2019s repository that will contain the needed script. This script will be used as a set of instructions for the pipeline to follow.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">I suggest a <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\"> that will be located in our project\u2019s repository. This will give us the freedom to manipulate the pipeline from within our IRI Workbench.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Therefore, we need to configure a few more things:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The pipeline will use a pipeline script (<\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\">) from SCM (Source Code Management)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The SCM (in our case it will be Git)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The repository URL of the project that will contain the pipeline script.<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15521 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart4-e1642536646816.png\" alt=\"\" width=\"550\" height=\"592\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart4-e1642536646816.png 725w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart4-e1642536646816-278x300.png 278w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">If we have chosen to utilize a <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\"> located in a project repository we must then specify the path to said <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\"> in the project\u2019s repository. After this we can click <\/span><i><span style=\"font-weight: 400;\">Save<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15522 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart5.png\" alt=\"\" width=\"547\" height=\"263\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart5.png 732w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart5-300x144.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jstart5-730x350.png 730w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Now we should have a pipeline that will trigger a build response when push events occur in the specified Git repository. Next, we can finally start writing our <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\"> located in our IRI project that will give instructions to the Jenkins pipeline.<\/span><\/p>\n<h6><b>Supplying Test Data with DB Subsets<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">For this demonstration I created a simple subset job in IRI Workbench that will eventually be executed from the CI\/CD pipeline. As mentioned previously, database subsetting is a valuable technique for test data generation and IRI Workbench supports the generation of Subsetting Jobs.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15523 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-subset.png\" alt=\"\" width=\"646\" height=\"189\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-subset.png 776w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-subset-300x88.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-subset-768x225.png 768w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Discussing how to create subsetting jobs does not really fall into the scope of this article. To learn how to build structurally and referentially correct (and possibly masked) database subsets for application testing, see <\/span><a href=\"https:\/\/www.iri.com\/blog\/vldb-operations\/iris-new-database-subsetting-wizard\/\"><span style=\"font-weight: 400;\">this how-to article<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Below is one of the underlying IRI task scripts for a command-line subsetting (batch) program:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15524 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-chiefs.png\" alt=\"\" width=\"650\" height=\"385\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-chiefs.png 771w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-chiefs-300x178.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-chiefs-768x455.png 768w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">The job above creates a subset table from a master table called CHIEFS. Notice that a masking (format preserving encryption) rule has also been applied to the NAME column to protect PII.\u00a0<\/span><\/p>\n<h6><b>Installing Jenkins Editor into IRI Workbench<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">The Jenkins Editor is an Eclipse-supported plugin that assists in the creation of <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\"> files. The Jenkins Editor also provides code completion and tooltips, syntax highlighting, and validation for Jenkins Linter and Groovy syntax. Because IRI Workbench is built on Eclipse, you can download the Jenkins Editor to help create and modify Jenkins pipeline files.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To install the Jenkins Editor plugin in IRI Workbench, the Eclipse Marketplace Client is required. If you have not already installed Marketplace Client, read <\/span><a href=\"https:\/\/www.iri.com\/blog\/iri\/iri-workbench\/iri-workbench-eclipse-marketplace\/\"><span style=\"font-weight: 400;\">this IRI blog article<\/span><\/a><span style=\"font-weight: 400;\"> first.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The steps involved whereby the user accesses the Eclipse Marketplace Client and installs the <\/span><a href=\"https:\/\/marketplace.eclipse.org\/content\/jenkins-editor\"><span style=\"font-weight: 400;\">Jenkins Editor<\/span><\/a><span style=\"font-weight: 400;\"> are exactly the same between the IRI Workbench and a standard Eclipse IDE.<\/span><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-15525 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkins-editor.png\" alt=\"\" width=\"505\" height=\"351\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkins-editor.png 505w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkins-editor-300x209.png 300w\" sizes=\"(max-width: 505px) 100vw, 505px\" \/><i><span style=\"font-weight: 400;\">Search for Jenkins Editor in Eclipse Marketplace or simply drag and drop into Marketplace from the <\/span><\/i><a href=\"https:\/\/marketplace.eclipse.org\/content\/jenkins-editor\"><i><span style=\"font-weight: 400;\">plugin page<\/span><\/i><\/a><i><span style=\"font-weight: 400;\">.<\/span><\/i><\/p>\n<h6><b>Creating a Jenkinsfile<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">After installing the Jenkins Editor, IRI Workbench should now be able to support the creation of Jenkins files. To create a <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile,<\/span><\/i><span style=\"font-weight: 400;\"> add a new file to your target project and name it \u201cJenkinsfile\u201d. The plugin will associate the name \u201cJenkinsfile\u201d with a file made for the express purpose of providing instructions to a Jenkins pipeline.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Do you notice in the image below how the script has the syntax color-coded and correctly indented? When creating\/editing larger Jenkins files where pipeline scripts are far more complex, the Jenkins Editor will surely come in handy.<\/span><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-15526 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-demoJenfile.jpg\" alt=\"\" width=\"258\" height=\"306\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-demoJenfile.jpg 258w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-demoJenfile-253x300.jpg 253w\" sizes=\"(max-width: 258px) 100vw, 258px\" \/><i><span style=\"font-weight: 400;\">Color-coded Jenkinsfile using Jenkins Editor<\/span><\/i><\/p>\n<h6><b>Configuring the Jenkins Pipeline to Run IRI (Test Data) Job Scripts<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">Depending on whether or not you have the IRI <\/span><a href=\"https:\/\/www.iri.com\/products\/cosort\/sortcl\"><span style=\"font-weight: 400;\">SortCL<\/span><\/a><span style=\"font-weight: 400;\"> engine installed on the same machine that is hosting your Jenkins server, your pipeline will execute your IRI job a little bit differently.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In a scenario where the Jenkins server is located on the same machine as the SortCL engine, the script below would be used to instruct my Jenkins pipeline to execute the batch file that was generated when I created my IRI subset job.<\/span><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15528 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenlocal.png\" alt=\"\" width=\"551\" height=\"141\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenlocal.png 672w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenlocal-300x77.png 300w\" sizes=\"(max-width: 551px) 100vw, 551px\" \/><i><span style=\"font-weight: 400;\">SortCL engine is hosted on the same machine as the Jenkins instance<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">Alternatively, if my Jenkins server was not located on the same machine running SortCL, I would have the added step of first connecting to the SortCL machine via SSH. Otherwise, I would have to create a remote connection through some other means.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Using SSH would require the use of SSH Agent. In the pipeline script below you can see the syntax used to run a SSH task that would be used to execute the IRI job remotely.<\/span><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15527 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jensshtask.png\" alt=\"\" width=\"500\" height=\"179\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jensshtask.png 506w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jensshtask-300x107.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><i><span style=\"font-weight: 400;\">SortCL engine is not hosted on the same machine as the Jenkins instance, so SSH is used to connect<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">My credentials are stored in Jenkins and I have environment variables set up in Jenkins for the host address and the commands that would be executed. The $CMDS variable holds the commands that would be used to execute the IRI job script.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The command would look something like this:<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">C:\\\\IRI\\\\workbench-demos\\\\subset-demo\\\\subset-demo\\\\new_subset &amp;&amp; .\\\\new_subset.bat<\/span><\/i><\/p>\n<h6><b>Triggering the Jenkins Pipeline from IRI Workbench<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">Because IRI Workbench supports Git Version Control we can <\/span><a href=\"https:\/\/www.iri.com\/blog\/iri\/iri-workbench\/introduction-metadata-management-hub\/\"><span style=\"font-weight: 400;\">commit and push IRI projects<\/span><\/a><span style=\"font-weight: 400;\"> from Workbench. Remember that when a push event occurs the Jenkins pipeline we created will be notified by GitHub webhooks. This lets us trigger the Jenkins pipeline directly from Workbench.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15529 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkin-from-workbench-1.png\" alt=\"\" width=\"650\" height=\"597\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkin-from-workbench-1.png 804w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkin-from-workbench-1-300x276.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-jenkin-from-workbench-1-768x706.png 768w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">When the Jenkins pipeline is triggered, the subset job runs on the command line and a table called SUB_CHIEFS will be created. Afterwards, you can see the results in IRI Workbench:<\/span><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15530 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-results.png\" alt=\"\" width=\"650\" height=\"481\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-results.png 975w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-results-300x222.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/db-subset-jenkins-results-768x569.png 768w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><i><span style=\"font-weight: 400;\">Contents of the SUB_CHIEFS table viewed in IRI Workbench<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">From the image above we can see that a sub table called SUB_CHIEFS has been created and has been populated with ten records from the CHIEFS table. Values in the NAME column were also encrypted.<\/span><\/p>\n<h6><b>Summary<\/b><\/h6>\n<p><span style=\"font-weight: 400;\">In this article, we have shown how to set up a GCP VM instance and install Jenkins on it. Afterwards, a Jenkins CI\/CD pipeline was created and set to listen to webhooks from our target GitHub repository.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We then discussed the Jenkins Editor, and how it can make configuring Jenkins files in IRI Workbench easier. Finally, we discussed and showed examples of how a <\/span><i><span style=\"font-weight: 400;\">Jenkinsfile<\/span><\/i><span style=\"font-weight: 400;\"> would be written to run an IRI subsetting job using the SortCL engine hosted on the same \u2013 or different &#8211; node.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As mentioned earlier, subsetting is useful for testing and development purposes. For example, developers may want to work with production data in a test environment but either do not want to or cannot afford to provide the necessary resources for a duplicate of their entire production database.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It can therefore be useful to have a smaller copy of the database with referential integrity still intact. Furthermore, by incorporating masking methods inside the process of subsetting, we are left with realistic data with its PII sanitized.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Considering that an application may require test data during the testing stages of a DevOps process, it only makes sense to integrate subsetting into the operations of the CI\/CD pipeline. By doing so we create one comprehensive process where we can build and deploy our test data\/databases alongside our application code to provide meaningful test data that will be consumed in the testing stages of the pipeline.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This Jenkins entry is the fourth in a series of articles on the use of IRI test data management software \u2013 that masks, synthesizes, or subsets data \u2013 to feed safe, referentially correct test data for DevOps to CI\/CD environments. Prior articles showed examples of test data creation in IRI software and the use of<\/p>\n<div><a class=\"btn-filled btn\" href=\"https:\/\/www.iri.com\/blog\/test-data\/db-subsets-in-jenkins-pipeline\/\" title=\"Testing with DB Subsets in a Jenkins CI\/CD Pipeline\">Read More<\/a><\/div>\n","protected":false},"author":152,"featured_media":15506,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[8,91,29],"tags":[14,966,1540,1654,1204,850,1652,1653],"class_list":["post-15501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-protection","category-iri-workbench","category-test-data","tag-data-masking","tag-database-subsetting","tag-google-cloud","tag-google-cloud-platform","tag-iri-sortcl","tag-iri-workbench","tag-jenkins","tag-jenkins-pipeline"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.4 (Yoast SEO v23.4) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Testing with DB Subsets in a Jenkins CI\/CD Pipeline - IRI<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing with DB Subsets in a Jenkins CI\/CD Pipeline\" \/>\n<meta property=\"og:description\" content=\"This Jenkins entry is the fourth in a series of articles on the use of IRI test data management software \u2013 that masks, synthesizes, or subsets data \u2013 to feed safe, referentially correct test data for DevOps to CI\/CD environments. Prior articles showed examples of test data creation in IRI software and the use ofRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/\" \/>\n<meta property=\"og:site_name\" content=\"IRI\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-18T20:30:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1110\" \/>\n\t<meta property=\"og:image:height\" content=\"624\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Adam Lewis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Adam Lewis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/\"},\"author\":{\"name\":\"Adam Lewis\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/37c0e5beab094bd61cc521902df2876e\"},\"headline\":\"Testing with DB Subsets in a Jenkins CI\/CD Pipeline\",\"datePublished\":\"2022-01-18T20:30:23+00:00\",\"dateModified\":\"2022-01-18T20:30:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/\"},\"wordCount\":2261,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg\",\"keywords\":[\"data masking\",\"database subsetting\",\"Google Cloud\",\"Google Cloud Platform\",\"IRI SortCL\",\"IRI Workbench\",\"Jenkins\",\"Jenkins Pipeline\"],\"articleSection\":[\"Data Masking\/Protection\",\"IRI Workbench\",\"Test Data\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/\",\"url\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/\",\"name\":\"Testing with DB Subsets in a Jenkins CI\/CD Pipeline - IRI\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg\",\"datePublished\":\"2022-01-18T20:30:23+00:00\",\"dateModified\":\"2022-01-18T20:30:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg\",\"width\":1110,\"height\":624},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.iri.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Testing with DB Subsets in a Jenkins CI\/CD Pipeline\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.iri.com\/blog\/#website\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"name\":\"IRI\",\"description\":\"Total Data Management Blog\",\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.iri.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\",\"name\":\"IRI\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"width\":750,\"height\":206,\"caption\":\"IRI\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/37c0e5beab094bd61cc521902df2876e\",\"name\":\"Adam Lewis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/087667d0c75d33bb6fab6e734bd89333?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/087667d0c75d33bb6fab6e734bd89333?s=96&d=blank&r=g\",\"caption\":\"Adam Lewis\"},\"url\":\"https:\/\/www.iri.com\/blog\/author\/adaml\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Testing with DB Subsets in a Jenkins CI\/CD Pipeline - IRI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/","og_locale":"en_US","og_type":"article","og_title":"Testing with DB Subsets in a Jenkins CI\/CD Pipeline","og_description":"This Jenkins entry is the fourth in a series of articles on the use of IRI test data management software \u2013 that masks, synthesizes, or subsets data \u2013 to feed safe, referentially correct test data for DevOps to CI\/CD environments. Prior articles showed examples of test data creation in IRI software and the use ofRead More","og_url":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/","og_site_name":"IRI","article_published_time":"2022-01-18T20:30:23+00:00","og_image":[{"width":1110,"height":624,"url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg","type":"image\/jpeg"}],"author":"Adam Lewis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Adam Lewis","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#article","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/"},"author":{"name":"Adam Lewis","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/37c0e5beab094bd61cc521902df2876e"},"headline":"Testing with DB Subsets in a Jenkins CI\/CD Pipeline","datePublished":"2022-01-18T20:30:23+00:00","dateModified":"2022-01-18T20:30:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/"},"wordCount":2261,"commentCount":0,"publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg","keywords":["data masking","database subsetting","Google Cloud","Google Cloud Platform","IRI SortCL","IRI Workbench","Jenkins","Jenkins Pipeline"],"articleSection":["Data Masking\/Protection","IRI Workbench","Test Data"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/","url":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/","name":"Testing with DB Subsets in a Jenkins CI\/CD Pipeline - IRI","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage"},"image":{"@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg","datePublished":"2022-01-18T20:30:23+00:00","dateModified":"2022-01-18T20:30:23+00:00","breadcrumb":{"@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#primaryimage","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg","width":1110,"height":624},{"@type":"BreadcrumbList","@id":"https:\/\/www.iri.com\/blog\/data-transformation2\/db-subsets-in-jenkins-pipeline\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.iri.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Testing with DB Subsets in a Jenkins CI\/CD Pipeline"}]},{"@type":"WebSite","@id":"https:\/\/www.iri.com\/blog\/#website","url":"https:\/\/www.iri.com\/blog\/","name":"IRI","description":"Total Data Management Blog","publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.iri.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.iri.com\/blog\/#organization","name":"IRI","url":"https:\/\/www.iri.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","width":750,"height":206,"caption":"IRI"},"image":{"@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/37c0e5beab094bd61cc521902df2876e","name":"Adam Lewis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/087667d0c75d33bb6fab6e734bd89333?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/087667d0c75d33bb6fab6e734bd89333?s=96&d=blank&r=g","caption":"Adam Lewis"},"url":"https:\/\/www.iri.com\/blog\/author\/adaml\/"}]}},"jetpack_featured_media_url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2022\/01\/Jenkin-thumbnail.jpg","_links":{"self":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/15501"}],"collection":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/users\/152"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/comments?post=15501"}],"version-history":[{"count":7,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/15501\/revisions"}],"predecessor-version":[{"id":15532,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/15501\/revisions\/15532"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media\/15506"}],"wp:attachment":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media?parent=15501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/categories?post=15501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/tags?post=15501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}