Gradle plugin for building a prim and proper Lookout service artifact
Go to file
R. Tyler Croy 6c17234ef7 Clean up support for generating service.version {}
This has been manually tested in a project external to this plugin, will need
to get some integration tests going Real Soon Now(tm)
2015-04-18 21:36:16 -07:00
gradle/wrapper Schalk says to test/build against Gradle 2.0 for best compatibility testing 2015-04-15 12:38:05 -07:00
src Clean up support for generating service.version {} 2015-04-18 21:36:16 -07:00
.gitignore Add intellij project files 2015-04-18 21:00:03 -07:00
.travis.yml Enable builds on TravisCI 2015-03-25 09:24:30 -07:00
LICENSE Initial commit 2015-03-24 20:18:54 -07:00
README.md Remove an unnecessary slash 2015-04-17 10:41:49 -07:00
build.gradle Clean up support for generating service.version {} 2015-04-18 21:36:16 -07:00
gradle.properties Add the basic plumbing to build and test the gradle plugin 2015-03-25 08:42:19 -07:00
gradlew Add the gradle wrapper scripts 2015-03-25 08:24:07 -07:00
gradlew.bat Add the gradle wrapper scripts 2015-03-25 08:24:07 -07:00
service-artifact-gradle-plugin.iml Add intellij project files 2015-04-18 21:00:03 -07:00
service-artifact-plugin.iml Clean up support for generating service.version {} 2015-04-18 21:36:16 -07:00
settings.gradle Clean up support for generating service.version {} 2015-04-18 21:36:16 -07:00

README.md

Service Artifact Gradle Plugin

BuildStatus Download

Gradle plugin for building a prim and proper service artifact. This plugin is meant to codify some standards and conventions around building service artifacts that can be easily built, tested and deployed

Dependencies

This plugin will include the appropriate versions of the following plugins:

  • jruby-gradle base
  • jruby-gradle jar
  • asciidoctor

Usage

Example

plugins {
    id "com.github.lookout.service-artifact" version "1.0"
}

/* serviceVersion is a helper method which will add SNAPSHOT when appropriate,
 * but also introduce the appropriate Gerrit or Travis meta-data into the version
 * number (e.g. 1.0.{GERRIT_CHANGE}.{GERRIT_PATCH})
 */
version = serviceVersion('1.0')
description = 'A sample Service to be built with Gradle'
group = 'com.github.lookout'

/* The following is an example of what a Gradle file might look like
 * for a JRuby-based service artifact.
 *
 * A service artifact is a self-contained artifact containing everything
 * execute a service. An artifact will take the form of a .tar.gz file,
 * and inside would be:
 *
 *  my-fancy-service.tar.gz
 *      - bin/ # managmeent scripts, as determined by @mbbx6spp
 *          - start
 *          - stop
 *      - my-fancy-service.jar
 */

service {
    jruby {
        /* Include these directories into the service jar.
         *
         * By default the `app` and `config` directory will
         * be included as well as the `config.ru` file if it is present
         */
        include 'backend', 'lib'
    }

    /* scripts inside of bin/ will override the defaults,
     * but this closure can be used to source additional scripts
     */
    scripts {
        include 'examples/bin'
    }
}

dependencies {
    gems "rubygems:faraday:1.0"
}

Tasks

Build

  • distShadowTarGz
  • distShadowZip
  • assemble

Test

  • (JRuby) spec
  • (JRuby) cucumber
  • check

Publish

  • uploadArtifacts

Internal-ish

  • prepareServiceScripts - empty by default, can be used to set up build logic to generate service scripts
  • prepareServiceJar - largely empty right now, just a standard dependency to chain builder tasks like shadowJar for jruby-gradle-jar plugin off of.

Documentation

  • docs
  • (asciidoctor) asciidoctor