https://github.com/rundeck/nexus-rundeck-plugin
This is a Nexus plugin that provides an Option provider for Rundeck.
The plugin provides the following new HTTP resources :
http://NEXUS_HOST/service/local/rundeck/options/version
: return a json array with the version of the matching artifacts. Parameters (all optional) :r
: repository ID to search in (null for searching in all indexed repositories)g
: groupId of the artifacts to matcha
: artifactId of the artifacts to matchp
: packaging of the artifacts to match ('jar', 'war', etc)c
: classifier of the artifacts to match ('sources', 'javadoc', etc)l
: limit - max number of results to returnincludeLatest
: if "true", will include the special "LATEST" version before all versionsincludeRelease
: if "true", will include the special "RELEASE" version before all versions
http://NEXUS_HOST/service/local/rundeck/options/artifactId
: return a json array with the artifactId of the matching artifacts. Parameters (all optional) :r
: repository ID to search in (null for searching in all indexed repositories)g
: groupId of the artifacts to matchv
: version of the artifacts to matchp
: packaging of the artifacts to match ('jar', 'war', etc)c
: classifier of the artifacts to match ('sources', 'javadoc', etc)
Note that if you want to retrieve the artifact from your Rundeck script, you should use Nexus REST API. A simple example is:
wget "http://NEXUS_HOST/service/local/artifact/maven/content?r=reponame&g=${option.groupId}&a=${option.artifactId}&v=${option.version}" --content-disposition
- Version 1.4
- Release with support for Nexus 2.8
- Migrated to JSR-330 annotations
- Version 1.2.2.2 : re-release 1.2, but with a dependence on Nexus 1.9.2.2 (instead of Nexus 1.9)
- Version 1.2 : the option provider for version now includes the date of the version (release)
- Version 1.1 : add option provider for artifactId
- Version 1.0 : option provider for version. compatible with Nexus 1.9 and Rundeck 1.1
- Download the latest from https://github.com/rundeck/nexus-rundeck-plugin/releases
- Unzip the "nexus-rundeck-plugin-VERSION-bundle.zip" file into the "plugin-repository" directory (located in "$NEXUS_HOME/sonatype-work/nexus/plugin-repository") You should have a "nexus-rundeck-plugin-VERSION" directory with a "nexus-rundeck-plugin-VERSION.jar" file inside it
- Then, you just need to restart Nexus.
- prerequisites : Apache Maven 3.0.4 - 3.0.5 http://maven.apache.org/
- Java 1.7
- run "mvn package"
- use the "bundle" file in target/nexus-rundeck-plugin-VERSION-bundle.zip
LICENSE : The Apache Software License, Version 2.0 See the LICENSE file, or http://www.apache.org/licenses/LICENSE-2.0
Original project by Vincent Behar