Morpheus Gradle Plugin
The Morpheus Gradle plugin provides tasks for deployment automation to the Morpheus Cloud Management platform. Deploy any of your applications to a morpheus on or off-premise setup.
Configuration
Simply add the plugin to your project and configure it using the morpheus
configure block
//Example build.gradle file
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath "com.bertramlabs.plugins:morpheus-gradle:0.1.2"
}
}
apply plugin: 'com.bertramlabs.morpheus'
morpheus {
morpheusUser = 'blah'
morpheusPassword = 'dafsadfsdf'
applianceUrl = 'https://v2.gomorpheus.com'
instance = 'My Instance Name'
from "build/libs/*"
deployConfiguration = [
catalinaOpts: '-Dgrails.env=prod'
]
}
A from
command can be either a path to files to upload to the final deployment archive or they can be a Closure with more advanced options:
morpheus {
from {
resolverPath = 'build/libs/*'
includePatterns = ['**/*.war']
excludePatterns = ['*.jar']
//destinationPath = '' Useful for nesting into a subfolder of the deploy archive
}
}
Usage
Simply execute the task:
./gradlew morpheusDeploy