DROPS for Jenkins
The DROPS plug-in for Jenkins is an open-source tool for continuous integration.
The DROPS for Jenkins plug-in is intended for release managers and is compatible with both ways to use Jenkins (normal and pipeline, which is scriptable). It enables you to trigger the execution of import and deployment processes via Jenkins. You can add as many steps in a Jenkins job as required, and each can call DROPS to execute a different task.
Only one DROPS Server can be piloted by Jenkins. The DROPS Server linked to Jenkins will be the only one for which you can select pre-defined import and deployment processes to launch.
This chapter describes how to install, configure and use the DROPS for Jenkins plug-in. There is no configuration required in DROPS.
-
Jenkins must be installed. The plug-in is compatible with Jenkins ≥v2.176.3.
ReferenceFor more information about installing Jenkins, refer to the Jenkins Installation Guide.
- The ARCAD-Commons plug-in must be installed on Jenkins. This plug-in, common to many ARCAD products on Jenkins, only needs to be installed once, no matter how many ARCAD product plug-ins are installed on Jenkins. To install the ARCAD-Commons plug-in, click Manage Jenkins in the left menu of the dashboard, then click Manage Plugins and open the Advanced tab. In the Upload Plugin section, click Choose File... and navigate to the location where the file is stored. Select the arcad-commons.hpi file and click Open. Click Upload.
The DROPS for Jenkins plug-in is a simplified version of the full DROPS tool. This guide assumes that you are already familiar with the basics of DROPS and that the processes to execute have already been configured. This plug-in does not offer any DROPS configuration features.
Add the DROPS for Jenkins plug-in to Jenkins and set the server connection details.
Follow the subsequent steps to install an ARCAD plug-in on Jenkins.
Step 1 Open Jenkins in a navigator.
Step 2 To access the plug-in install page, click Manage Jenkins in the left menu of the dashboard, then click Manage Plugins and open the Advanced tab.
Step 3 In the Upload Plugin section, click Choose File... and navigate to the location where the installation file is stored. Select the .hpi file that corresponds to the product and click Open.
Step 4 Click Upload.
Step 5 To complete the installation, check Restart Jenkins when installation is complete and no jobs are running, and wait for Jenkins to restart.
Result The plug-in is installed and available for use.
The following configuration is required.
Follow the subsequent steps to configure the DROPS for Jenkins plug-in.
Step 1 To access the plug-in configuration page, click Manage Jenkins in the left menu of the dashboard, then click Configure System and find the DROPS section.
Step 2 Define in the following fields:
Field | Description |
---|---|
URL |
Define the URL address where the DROPS Server is located. This URL is usually made up of a prefix, http:// or https://, then followed by the server's host name (DNS name or IP address) and the server's port. By default, the DROPS Server uses the 5254 port number or the 52540 port number for the secured connection, but these numbers may have been changed during configuration. |
Credentials | Enter a valid DROPS Server user and the corresponding password. Click the Add button to add any user defined on the DROPS Server. |
Step 3 Use the Test connection button to ensure that the connection is successful.
Step 4 To save any changes made, click Save.
Result The DROPS for Jenkins plug-in is connected to the DROPS Server.
Create DROPS steps for Jenkins projects from the Build Environment configuring settings.
Step 1 In the home page, select the desired project.
Step 2 On the left menu, click Configuration then select the Build tab or scroll down to the Build section.
Step 3 In the Build section, select one of the DROPS steps from the Add build step drop-down list.
Result The step is added and ready to be defined.
Define the following parameters for each DROPS: Import step added to a Jenkins project. These parameters define the release to import. They are the same parameters required to define an import process instance in the DROPS Studio.
The import is launched via Jenkins in the DROPS Studio.
For more information about defining import process instances, refer to About importing artifacts.
Field | Description |
---|---|
Application | Select the application for which to import the artifacts. The list is pre-populated with all of the applications defined in the DROPS Server. |
Release |
Select the release in which to save the artifacts that will be imported.
You can create a new release by adding a script via the pipeline. To create a release by providing a release number (or updating an existing release if the number already exists) you must use the Jenkins pipeline. The following is the syntax to follow: *pipeline {
agent any
stages {
stage('DEMO') {
steps {
dropsImport application: [code: 'DEMO'],
executions: [[component: [code: 'WEBAPP'], externalVersion: '1.0.0.0', strategy: [code: 'WEBAPP_GIT_IMPORT']]],
{color:#ff0000}release: [$class: 'NamedRelease', number: 'BUILD_${BUILD_NUMBER}']{color},
releaseDescription: 'my test from pipeline',
resetRelease: true,
startAutomatically: true
}
}
}
}*
The *NamedRelease* parameter must be paired with one of the following parameters in order to find the correct release. If the corresponding release exists, the task will update it, if it doesn't exist, Jenkins will create a new release.
|
Release Description | If a description is added to the step in Jenkins, any existing description of the release in DROPS will be replaced when the build is launched. |
Reset release | Tick the Reset release before importing checkbox to purge the selected release of all of its contents before importing the artifacts. The current import replaces the old content completely. |
Automatically start | Tick this checkbox to automatically start the import process automatically. If unselected, the import execution instance is created but not launched. |
Executions | Define the component/import strategy pair(s) to use to import the artifacts. You can add as many pre-defined pairs as needed. |
Select the Component. The list is pre-populated with all of the components defined for the selected application. | |
Select the Import strategy. The list is pre-populated with all of the strategies defined for the selected component. | |
Enter the version number to import. Enter *RELEASE to refer to the default release defined in the DROPS Studio. |
Save the job’s configuration.
Define the following parameters for each DROPS: Deploy step added to a Jenkins project. These parameters define the process to deploy. They are the same parameters required to define a deployment process instance in the DROPS Studio.
The deployment is launched via Jenkins in the DROPS Studio.
For more information about defining import process instances, refer to About deploying releases.
Field | Description |
---|---|
Application | Select the application for which to deploy the artifacts. The list is pre-populated with all of the applications defined in the DROPS Server. |
Release | Select the release to deploy. If you select an existing release, the list of releases to select is pre-populated with the releases that have already been imported. |
Environment | Select the environment to which to deploy the release. |
Process | Select the deployment process to use. The list is prepopulated with the processes available for the selected environment. |
Save the job’s configuration.
If your Jenkins project is a pipeline, generate the script for each DROPS step using the Pipeline Syntax generator in the Pipeline section of the project's confirmation view.
Step 1 From a pipeline project's Pipeline section, click the Pipeline Syntax link.
Step 2 Select a DROPS import or deployment step from the Step menu and then define the parameters required. The parameters for each type of step are described above.
Step 3 Click the Generate Pipeline Script button.
The technical IDs are used by default when generating the code in the pipeline script. To change the IDs to the entity's code or release number (to better understand the written script) you can do so manually.
dropsDeploy application: [id: '1'], environment: [id: '1'], process: [id: '4'], release: [$class: 'ExistingRelease', id: '2']
is the same as the following, once the IDs are changed to the entities' names:
dropsDeploy application: [code: 'SalesApp'], environment: [code: 'PRD-USA'], process: [code: 'PRD-DEPLOY-SALESAPP'], release: [$class: 'ExistingRelease', number: '0.1.0.0']
Step 4 Copy the script and paste it into your project's Script section.
DROPS Server logs are available in Jenkins after an import or deployment step has been carried out.
A process can have one of three statuses in Jenkins, each which correspond to an execution status in the DROPS Studio.
DROPS Studio | Jenkins |
---|---|
In Progress | Tasks stay "in progress" until any and all issues are handled in the DROPS Studio. |
Suspended | Unstable |
Canceled | Unstable |
Succeeded | Successful |
Succeeded with Warnings | Successful |
Failed | Failure |