Write Deployer extension as add-on for Tridion sites

To create deployer extension with recent dxd changes we need to implement deployer step and same need to added inside pipelines on deployer-conf.xml

example

<Pipelines>
...
...
<Pipeline Id="Tridion-Example-Step" Action="Deploy,Undeploy" Verb="Process">
<Steps>
<Step Id="ExampleExtension" />
</Steps>
</Pipeline>
...
...
</Pipelines>

and we need to write step class which implements ExecutableStep (please refer https://github.com/neeteshnarvaria/deployer-extension/blob/master/src/main/java/org/rws/example/ExampleExtension.java)

related dependencies can be found inside deployer installation lib directory
%DXD%/deployer-combined/lib

example step class

when implement we need to implement its configure and process method

@Step("ExampleExtension")
public class ExampleExtension implements ExecutableStep {
@Override
public void configure(Configuration configuration) throws ConfigurationException {
//this is section where we initialize configurations for the step
}

@Override
public ExecutableStepResult process(ProcessingContext processingContext, StepDataProvider stepDataProvider) throws ProcessingException {
return null;
}

}
 

pom.xml contains build step to generate add-on and if required we need to update it accordingly please refer https://github.com/neeteshnarvaria/deployer-extension/blob/master/pom.xml 

after everything is done, run maven command to build

mvn clean package

above command generates addon package inside addon folder as mentioned in pom.xml build step

for logging we need to include logback-example.xml in deployer service logback.xml

for example 

<include resource="logback-example.xml"/>  reference: File inclusion · The logback manual

after adding generated zip on add-ons we need to restart dxd deployer service to get this extension activated


for reference please refer: https://github.com/neeteshnarvaria/deployer-extension