Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bmuschko/gradle-cloudbees-plugin
Gradle plugin that provides support for managing applications and databases on CloudBees RUN@cloud
https://github.com/bmuschko/gradle-cloudbees-plugin
cloudbees deployment gradle-plugin
Last synced: 3 days ago
JSON representation
Gradle plugin that provides support for managing applications and databases on CloudBees RUN@cloud
- Host: GitHub
- URL: https://github.com/bmuschko/gradle-cloudbees-plugin
- Owner: bmuschko
- License: apache-2.0
- Created: 2013-02-28T23:12:30.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-22T12:52:37.000Z (about 11 years ago)
- Last Synced: 2024-11-05T20:47:17.633Z (about 2 months ago)
- Topics: cloudbees, deployment, gradle-plugin
- Language: Groovy
- Homepage:
- Size: 275 KB
- Stars: 1
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.asciidoc
- License: LICENSE.txt
Awesome Lists containing this project
README
Gradle CloudBees plugin
=======================image:https://jenkins-ci.org/sites/default/files/images/CloudBees-logo.thumbnail.png[CloudBees Logo]
|=======
|The development of this plugin has been taken over by CloudBees. Please refer to its new GitHub repository link:https://github.com/CloudBees-community/gradle-cloudbees-plugin[CloudBees-community/gradle-cloudbees-plugin]. Development on this repository is discontinued.
|=======The plugin provides support for managing applications and databases on link:http://www.cloudbees.com/run.cb[CloudBees RUN@cloud].
Under covers the plugin communicates with the CloudBees backend via the link:https://github.com/cloudbees/cloudbees-api-client[CloudBees API client].
The code of the plugin is featured in chapter 8 of the book link:http://www.manning.com/muschko["Gradle in Action"] published by Manning.== Usage
To use the CloudBees plugin, include in your build script:
[source,groovy]
----
apply plugin: 'cloudbees'
----The plugin JAR needs to be defined in the classpath of your build script. It is directly available on
link:http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.gradle.api.plugins%22%20AND%20a%3A%22gradle-cloudbees-plugin%22[Maven Central].
Alternatively, you can download it from GitHub and deploy it to your local repository. The following code snippet shows an
example on how to retrieve it from Maven Central:[source,groovy]
----
buildscript {
repositories {
mavenCentral()
}dependencies {
classpath 'org.gradle.api.plugins:gradle-cloudbees-plugin:0.1'
}
}
----== Tasks
The CloudBees plugin defines the following tasks:
=== Application tasks
[options="header"]
|=======
|Task name |Depends on |Type |Description
|`cloudBeesAppChecksums` |- |CloudBeesAppChecksums |Returns the checksums for an application.
|`cloudBeesAppDelete` |- |CloudBeesAppDelete |Deletes an application.
|`cloudBeesAppDeployEar` |- |CloudBeesAppDeployEar |Deploys a new version of an application using a EAR file.
|`cloudBeesAppDeployWar` |- |CloudBeesAppDeployWar |Deploys a new version of an application using a WAR file.
|`cloudBeesAppInfo` |- |CloudBeesAppInfo |Returns the basic information about an application.
|`cloudBeesAppList` |- |CloudBeesAppList |Returns the list of applications available to your account.
|`cloudBeesAppRestart` |- |CloudBeesAppRestart |Restarts all deployed instances of an application.
|`cloudBeesAppStart` |- |CloudBeesAppStart |Starts all deployed instances of an application.
|`cloudBeesAppStop` |- |CloudBeesAppStop |Stops all deployed instances of an application.
|`cloudBeesAppTail` |- |CloudBeesAppTail |Establishes a persistent connection to the application logs.
|========== Database tasks
[options="header"]
|=======
|Task name |Depends on |Type |Description
|`cloudBeesDbCreate` |- |CloudBeesDbCreate |Creates a new database.
|`cloudBeesDbDrop` |- |CloudBeesDbDrop |Drops a database.
|`cloudBeesDbInfo` |- |CloudBeesDbInfo |Returns information about connecting to a database.
|`cloudBeesDbList` |- |CloudBeesDbList |Returns a list of all the databases associated with your account.
|========= Extension properties
The CloudBees plugin defines the following extension properties in the `cloudBees` closure:
[options="header"]
|=======
|Property name |Type |Default value |Description
|`apiFormat` |String |`XML` |The CloudBees API format.
|`apiVersion` |String |`1.0` |The CloudBees API version.
|`apiUrl` |String |`https://api.cloudbees.com/api` |The CloudBees API URL.
|`apiKey` |String |value of property named `cloudbees.api.key` |The CloudBees API key.
|`apiSecret` |String |value of property named `cloudbees.api.secret` |The CloudBees API secret.
|`appId` |String |Not null |The application identifier on CloudBees.
|`dbId` |String |Not null |The database identifier on CloudBees.
|========== Example
[source,groovy]
----
cloudBees {
appId = 'gradle-in-action/to-do-app'
dbId = 'gradle-in-action/to-do-db'
}cloudBeesAppDeployWar.message = project.version
----== Setting API credentials
If you decide to use the properties `cloudbees.api.key` and `cloudbees.api.secret` to populate your API credentials it
is recommended to set them in your `~/.gradle/gradle.properties` file. The following code snippet shows an example:[source,groovy]
----
cloudbees.api.key = yourApiKey
cloudbees.api.secret = yourApiSecret
----