WebLogic Deployer Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID weblogic-deployer-plugin Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
2.9.1
Dec 20, 2013
1.500
maven-plugin (version:1.500)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Raphael CHAUMIER (id: RaphC)
Usage Installations 2013-Apr 281
2013-May 297
2013-Jun 302
2013-Jul 347
2013-Aug 356
2013-Sep 371
2013-Oct 407
2013-Nov 373
2013-Dec 361
2014-Jan 402
2014-Feb 426
2014-Mar 433

This plugin deploys any artifacts built on Jenkins to a weblogic target (managed server, cluster ...) as an application or a library component.

Pre-requisites

Before 1.4, the plugin is applicable only for maven 2/3 Job.
Since 1.4, the plugin supports all project's type.
This plugin only deploys ear, war, jar artifacts.

Getting Started

Before use it, the plugin has to be configured. It consists of loading the weblogic target configuration, choosing the default JDK to run a deployment task and adding the weblogic library path (i.e /pathtojar/weblogic.jar or/pathtojar/wlfullclient.jar for WL 10.3).

Configuration

System Configuration

  • Jdk : the jdk used to run a deployment task.
  • Additional classpath : weblogic.jar file path loaded for deployment. If no value is set but the WL_HOME environment variable is found, the plugin will try to load  %WL_HOME%/server/lib/weblogic.jar.
  • Java Options to use : the java options used by the java process when invoking the weblogic library. By default it will be -Xms256M -Xmx256M.
  • Excluding artifact name list : the built artifacts name pattern excluded from post build deployment action.
  • Disable : If checked, the plugin execution is disabled.
  • Configuration File : xml file path containing deployments targets. It has to be [http://host:port/plugin/weblogic-deployer-plugin/defaultConfig/plugin-configuration.xsd] schema compliant. No validation currently performed. The file can be added through a local path (/usr/users/.../plugin-configuration.xml) or a remote URL (http://xxxxxxxxx/plugin-configuration.xml);
    configuration.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <config xmlns="http://org.jenkinsci.plugins/WeblogicDeploymentPlugin"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://org.jenkinsci.plugins/WeblogicDeploymentPlugin plugin-configuration.xsd"<weblogic-targets>
    	<weblogic-target>
    		<name>_name_</name>
    		<host>_weblogic.admin.server.host_</host>
    		<port>_weblogic.admin.server.port_</port>
    		<login>_weblogic.admin.server.login_</login>
    		<password>_weblogic.admin.server.password_</password>
    		<authMode>BY_KEY</authMode>
    		<userconfigfile>P:\Documents\perso\dev\wls-deploy-plugin\wls_userConfig.properties</userconfigfile>
    		<userkeyfile>P:\Documents\perso\dev\wls-deploy-plugin\wls_userConfig.key</userkeyfile>
    		<!-- optional -->
    		<ftpHost>_weblogic.remote.host_</ftpHost>
    		<ftpUser>_weblogic.remote.user_</ftpUser>
    		<ftpPassowrd>_weblogic.remote.password_</ftpPassowrd>
    		<remoteDir>/remote/file/to/path/used/to/deploy/libraries</remoteDir>
    		<!-- -->
    	</weblogic-target>
    </weblogic-targets>
    </config>
    
Authentication mode

There are 2 kinds of authentication :

  • BY_KEY : use a keystore file and and config file
  • BY_LOGIN : use a login/password (this is the default authentication mode).

Since 2.3, the plugin also supports authentication by keystore. To use it, set authMode with BY_KEY value then set userconfigfile/userkeyfile elements. If you forget to specify authMode with BY_KEY value, the plugin uses the default authentication mode BY_LOGIN.

NB : the ftpHost/ftpUser/ftpPassowrd/remoteDir are used to deploy libraries. Basically, \_weblogic.remote.host\_ should be the same as \_weblogic.admin.server.host\_

Job Configuration

If the plugin is not configured

If no configuration has been set, the plugin will display an error message

If the plugin is already configured

If the plugin is already configured, jenkins will display the job plugin configuration form.

  • Deployment task list : The list of deployments ran. For each task, some of parameters has to be set :
    • Task name (optional) : The name of the task which will be used to identify it.
    • environment : the targeted weblogic environment. Can be customized.
    • name : the name used by weblogic to display component.
    • Base directory where the resource can be found (only for freeStyle projects) 
    • Built resource to deploy : a regular expression to filter resource which will be deployed instead of the default one (maven convention artifact filename)
    • targets: the weblogic target (can be a managed server instance, a cluster either the AdminServer). By default the plugin will use the AdminServer as the target. Many targets can be defined and will be separated by un comma symbol (e.g AdminServer, ManagedServer1, Cluster2). Can be customized.
    • weblogic libraries : If checked, the generated artifact will be deployed as a library component.
    • advanced configuration : See the chapter below Job Advanced configuration.
  • Build failed when deployment failed : If checked, The current build will be flagged as a failed one if the deployment task failed.
  • Force deployment tasks stop on first failure : Useful if you have any task configured and you want to stop the next deployments tasks where an error occurs.
  • Deployment strategy : Configure which cause(s) will trigger the deployment action. If 'None specified' is selected, the deployment occurs each time the job builds. If another ones are selected, the deployement action only occurs when the build was triggered by a chosen cause.
  • Deploying only when sources changes : If checked, the deployment action only occurs when the build trigger by a parametrized cause AND the SCM step detects any changes.
  • Projects deployment Dependencies : (experimental) specifies a dependency with others job deploying some artifacts.
Customization of parameters

Some of parameters can also be tokenized with envrionment variables or even build parameters. Here are these parameters :

    • environment: Instead of setting a fixed value into the configuration file (e.g localhost:7000) you can set a variable like ${WL_HOST}:${WL_PORT}
    • targets: Instead of setting a fixed value (e.g AdminServer) you can set a variable like ${ENV_TARGET} or $TARGET.

Use the build parameter plugin or add some environment variable to set these values

Job Advanced configuration

It's possible to set the JDK to use directly in the Job configuration. This option is available in advanced task section. By default if no jdk is specified, the plugin will use the global configuration

  • Jdk name : The name of the jdk. If the value matches an existing JDK, the plugin will display a list of matched JDK. Choose one will automatically fill up the jdk home value
  • Jdk home : the path to the JDK home.
  • Stage mode : stage,nostage or external stage
  • Command line : The command which will be run by the deployer instead of the default ones (undeploy/deploy)
Override deployment execution

For advanced users, it can be useful to define the commands that the deployer has to run instead of the default ones, To enable this feature, the user will set different command lines into the 'Command line' field of Job advanced configuration.

These commands has to be ended by the ';' separator. The following plugin token can be added to the command line :

  • {wl.deployment_name} : the 'Name' parameter value
  • {wl.source} :  the resource to deploy (figured out by the plugin)
  • {wl.targets} : the 'Targets' parameter value
  • {wl.host} : the host part of the 'Environment' parameter
  • {wl.port} : the port part of the 'Environment' parameter
  • {wl.deploymentPlan} : the path of the deployment plan of the 'Environment' parameter
  • {wl.login} : the login to authenticate to the server (provided by the configuration file)
  • {wl.password} : the password to authenticate to the server (provided by the configuration file)
  • {wl.user_configfile} : the Deployer configuration file (defined in the configuration file)
  • {wl.user_keyfile} : the private key to authenticate (provided by the configuration file)

Note : only the arguments and parameters can be specified. The java executable used to run the command will be figure out by the plugin with the same algorithm than a default execution.

For instance : the user who prefers run deployment with 'distribute' instead of deploy could be set the following command lines:

command line parameter
-adminurl http://{wl.host}:{wl.port} -user {wl.login} -password {wl.password} -debug -remote -verbose -name {wl.deployment_name} -source {wl.source} -targets {wl.targets} -cancel;
-adminurl http://{wl.host}:{wl.port} -user {wl.login} -password {wl.password} -name {wl.deployment_name} -source {wl.source} -targets {wl.targets} -distribute

NB : Environment variables and build parameters can also be used.

User Guide

Build status

The build status will be modified according the following rules :

  • status is set to SUCCESS when the deployment task is successfully achieved.
  • status is set to UNSTABLE when :
    • at least one of the verification of the deployment task failed (PLUGIN_DISABLED, OTHER_TRIGGER_CAUSE, NO_CHANGES, UNSATISFIED_DEPENDENCIES, PREVIOUS_STATUS_BUILD_FAILED).
    • the deployment task failed and the Build failed when deployment failed parameter is not checked.
  • status is set to FAILED when the deployment task failed and the Build failed when deployment failed parameter is checked.
Check a build deployment status

On the build dashboard a new icon will appear. It displays the deployment status

Check the last successful deployment on main job dashboard

When you click on your job, a dashboard show a new icon with the date of the last successful deployment. If no deployment occurred or always failed. The date will be replaced by 'N/A' label.

View deployment Logs

You can view the deployment logs of each task. Simply click on the 'Deployments Statuses' link or 'Weblogic deployments' link. They will appear one by one in the deployment page.

Release Notes

Version 2.9.1 (December 20, 2013)

Fixing bug issue #20970 : deployment failed due to an unexpected stream closed exception.

Version 2.9 (November 30, 2013)

Handled exception when configuration file uploaded is incorrect.
Added error log on jenkins project selector bean.

Version 2.8 (October 06, 2013)

Fixing bug issue #16007

Version 2.7 (October 04, 2013)

Implementing issue #18685 Added support for customization of deployment targets/environment through build parameters.

Version 2.6 (September 16, 2013)

Implementing issue #19237 Added deployment plan support
Evolution issue #19016 Modified behavior when the step of pre-requisite check failed.

Version 2.5 (July 27, 2013)

Implementing issue #18882
Fixing bug issue #18940 token {wl.source} never replaced in command line

Version 2.4 (July 24, 2013)

Implementing issue #17300 and issue #18812 : Added new feature which allow the advanced user to define his own command to run
Fixing bug issue #18881 : NPE when the user viewing deployment result of a skipped execution
Fixing bug issue #18883 : cron value doesn't appear in 'Deploy periodically' field

Version 2.3 (June 26, 2013)

Implementing issue #18467 : stage mode attribute mishandled in job advanced configuration.
Implementing issue #17879 : Supports weblogic authentication by keystore.

Version 2.2 (May 04, 2013)

Implementing issue #17300 : Supports stage mode choice in job configuration.

Version 2.1 (May 03, 2013)

Implementing issue #17301 : Supports jdk configuration per job.

Version 2.0 (Mar 04, 2013)

Implementing issue #16808 : Supports multi-deployment feature.
Implementing issue #16699 : Searched resource pattern or name is traced in the job log

Be Careful
This version is not backward compatible.
Version 1.4 (Feb 11, 2013)

Implementing issue #15696 : Supports freestyle project.

Version 1.3 (Aug 13, 2012)

Implementing issue #14763 : English translation. The English language is the default plugin language.

Version 1.2 (Aug 2, 2012)

Implementing issue #14646 : The old java class or resources prefixed by HudsonXXXX has been refactored to XXXX.
Implementing issue #14626 : As of now, it's possible to filter the artifact name to deploy by regex defined in the job configuration. (Useful for maven multi-module project which generate many artifacts).

Version 1.1 (May 5, 2012)

Forked from Hudson version.

Added JDK selection on global configuration.

Removed task abortion if no compatibility detected between the JDK and the weblogic.Deployer API (As of now, It displays a warning).

Fixed translation and spelling errors.

Added WebLogic Server 10.3 support.

Labels

Edit
plugin-upload plugin-upload Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment