Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

FlexDeploy plugins are implemented in Java and are installed on the FlexDeploy server for use within workflows.  These plugins are automatically distributed to the endpoints where they are defined to execute.  A plugin consists of four components:

  • Implementation 
  • XML metadata describing its operations, properties, and other behavior
  • Setup scripts (optional) to initialize the environment prior to execution
  • Required 5.0.0 FlexDeploy libraries for Java implementation (download here)

Reference Example 

A fully functional plugin example for Apache HTTP Server, including source code, is provided for reference throughout this documentation.  This plugin provides four operations

...

The unix setup.sh setup script is used when executing on an endpoint using an SSH connection.  And this is true on Winodws Windows platforms as well, since cygwin is used in that case.  The setup.bat setup script is used only when executing on an endpoint using a localhost connection (and only in the event that the FlexDeploy server is running on Windows).

...

To fully test your plugin you will ultimately need to upload it to a FlexDeploy Server.  However, for unit testing purposes, it will be useful to test it a standalone testcase (e.g. using JUnit).  To help provide the setup which is required to test your plugin, the MockWorkflowExecutionContext class is provided.  This class manages manages some of the conext context attributes that are otherwise handled by the FlexDeploy framwork.  You will first need to satisfy the following prerequisites to test your plugin:

  • Add the FlexDeploy and 3rd party libaries to your classpath (i.e. adflibFlexFndCommonCore.jar, adflibFlexDeployCore.jar, commons-io-2.4.jar)
  • Add the following JVM arguments to your run configuration
    • flexagon.fd.install.root=<FlexDeploy working directory> (can be any directory on yoru your local computer)
    • flexagon.fd.repository.root=<Directory to host FlexDeploy artifact repository> (can be any directory on yoru yoour local computer)

The following setup must be performed using the JUnit @BeforeClass annotated methed, which will create the necessary FlexDeploy folders:

...