/
FlexDeploy Plugin SDK

FlexDeploy Plugin SDK

FlexDeploy provides dozens of out of the box plugins for building and deploying software using various technologies and middleware platforms. The FlexDeploy Plugin SDK allows customers or Flexagon partners to develop their own plugins. This guide provides the documentation for creating and managing these plugin implementations.

FlexDeploy plugins are implemented in Java or Docker image 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 

  • Metadata describing its operations, properties, and other behavior

  • Setup scripts (optional) to initialize the environment prior to execution

  • Required FlexDeploy libraries for Java implementation (Java 8+ or Java 7)

See detailed instructions below.

Development Approach

  • Decide on implementation type - Java or Docker, depending on your expertise.

  • Define plugin.xml and properties.xml files. This should help you describe operations that will be developed and project or environment/instance level properties used by each operation. You can also define plugin operation inputs as appropriate. At times, you can just use inputs without properties if it makes sense.

  • Developer plugin implementation.

  • Unit test plugin operations.

  • Package and verify on FlexDeploy server.

Plugin Implementation

Java Plugin

Plugin Lifecycle

Each plugin operation (e.g. build, deploy, start, stop) is implemented by extending AbstractPluginProvider.  

Apache HTTP Server - AbstractPluginProvider implementation - build operation

public class Build extends AbstractPluginProvider { private static final String CLZ_NAM = Build.class.getName(); private static final FlexLogger LOG = FlexLogger.getLogger(CLZ_NAM); public Build() { super(); } @Override public void validate() throws FlexCheckedException { //TODO } @Override public PluginResult execute() throws FlexCheckedException { //TODO } @Override public void cleanup() { //TODO } }

Using the XML metadata which is packaged wi