Create a deployment package using Jenkins
- Creating a deployment package containing artifacts from a build
- Publishing the package to a Deploy server
- Performing a deployment of the package to a target environment
After you install the Deploy plugin in Jenkins:
- Go to Manage Jenkins > Configure System.
In the Deploy section, enter credentials for your Deploy server and test the connection.
Note: You can add multiple Deploy credentials.
In Deploy, a deployment package contains the components that form your application. For example, web content, web server configuration, database scripts, compiled binaries such as .NET applications and Java Enterprise Edition (JEE) Enterprise Archive (EAR) files, and so on. For more information see, What’s in an application deployment package
Using the Deploy Jenkins plugin you can provide the contents of your deployment package, and define your application. This is completed as a post-build action.
- Select the Deploy with Deploy post-build action: Note: The Deploy post-build action can create a Deploy Deployment Archive (DAR file).
- Provide basic information about the application. You can use Jenkins variables in the fields. For example, the version is typically linked to the Jenkins
$BUILD_TAGvariable, as in
1.0.$BUILD_TAG. Note: The Jenkins Deploy plugin cannot set values for hidden CI properties.
- Add deployables to the package, select Package Application.
- To add artifacts, the Location field indicates where the artifact resides. For example, this can be the Jenkins workspace, a remote URI, or coordinates in a Maven repository.
Add additional properties as required for each artifact or resource.
Note: For properties of type
MAP_STRING_STRING, enter a single property value in the format
key1=value1. You can enter multiple values using the format
If you modify existing configuration item (CI) types or add new ones in Deploy, for example, by installing a new plugin, ensure that you click Reload types for credential in the post-build action. This reloads the CI types for the Deploy server that you have selected for the action. This prevents errors by ensuring that the most up-to-date CI types are available to the Jenkins job.
To publish the package to Deploy, select Publish package to Deploy. You can select the generated package or a package from another location, from the file system or from an artifact repository.
Note: The application must exist in Deploy before you can publish a package.
To deploy the application with Deploy, select the target environment and deployment options.