Skip to content

Instantly share code, notes, and snippets.

@grafjo
Created October 15, 2015 15:42
Show Gist options
  • Save grafjo/bbb6761e663b83e0a7f3 to your computer and use it in GitHub Desktop.
Save grafjo/bbb6761e663b83e0a7f3 to your computer and use it in GitHub Desktop.
Rundeck job using nexus step plugin
<joblist>
<job>
<context>
<options preserveOrder='true'>
<option enforcedvalues='true' name='repository' required='true' value='releases' values='releases,snapshots'>
<description>Nexus repository name</description>
</option>
<option name='version' required='true' value='LATEST'>
<description>Nexus artifact version</description>
</option>
</options>
</context>
<description>Deploys XXX to the a given system</description>
<dispatch>
<excludePrecedence>true</excludePrecedence>
<keepgoing>false</keepgoing>
<rankOrder>ascending</rankOrder>
<threadcount>1</threadcount>
</dispatch>
<executionEnabled>true</executionEnabled>
<id>534aaa6d-6a6b-4cff-95a3-f33f153ccb28</id>
<loglevel>INFO</loglevel>
<name>deploy-nexus</name>
<nodefilters>
<filter>nodename: .*</filter>
</nodefilters>
<nodesSelectedByDefault>false</nodesSelectedByDefault>
<scheduleEnabled>false</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<description>shutdown xxx</description>
<exec>sudo /etc/init.d/xxx stop</exec>
</command>
<command>
<description>transfer jar from nexus</description>
<step-plugin type='nexus-deliver-artifact-step'>
<configuration>
<entry key='artifact' value='backend' />
<entry key='destinationPath' value='/home/xxx/xxx.jar' />
<entry key='echo' value='true' />
<entry key='group' value='xxx.xxx.xxx' />
<entry key='packaging' value='jar' />
<entry key='repo' value='${option.repository}' />
<entry key='version' value='${option.version}' />
</configuration>
</step-plugin>
</command>
<command>
<description>start xxx again</description>
<exec>sudo /etc/init.d/xxx start</exec>
</command>
<command>
<description>check service has started</description>
<exec>/home/xxx/check_xxx_status.sh</exec>
</command>
</sequence>
<uuid>534aaa6d-6a6b-4cff-95a3-f33f153ccb28</uuid>
</job>
</joblist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment