From f968a2c1c86ad7b0b3cf213ba3b2c6f2f8863532 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sat, 4 Jul 2015 15:02:35 -0700 Subject: [PATCH] Move the README over to asciidoc and wire together publishing asciidoc to gh-pages --- README.md => README.adoc | 24 ++++++++++-------------- build.gradle | 35 +++++++++++++++++++++++++++++------ src/docs/asciidoc/index.adoc | 6 ++++++ 3 files changed, 45 insertions(+), 20 deletions(-) rename README.md => README.adoc (69%) create mode 100644 src/docs/asciidoc/index.adoc diff --git a/README.md b/README.adoc similarity index 69% rename from README.md rename to README.adoc index c916c59..817e873 100644 --- a/README.md +++ b/README.adoc @@ -1,12 +1,9 @@ -# Verspätung +image:https://travis-ci.org/lookout/verspaetung.svg?branch=master["Build Status", link="https://travis-ci.org/lookout/verspaetung"] -[![Build -Status](https://travis-ci.org/lookout/verspaetung.svg)](https://travis-ci.org/lookout/verspaetung) +image::https://api.bintray.com/packages/lookout/systems/verspaetung/images/download.svg[link="https://bintray.com/lookout/systems/verspaetung/_latestVersion"] -[ ![Download](https://api.bintray.com/packages/lookout/systems/verspaetung/images/download.svg) ](https://bintray.com/lookout/systems/verspaetung/_latestVersion) +Verspätung is a small utility which aims to help identify delay of link:http://kafka.apache.org[Kafka] consumers. -Verspätung is a small utility which aims to help identify delay of -[Kafka](http://kafka.apache.org) consumers. Verspätung monitors the topics and their latest offsets by talking to Kafka, it will also keep track of how far along consumers are by monitoring the offsets @@ -14,7 +11,7 @@ that they have committed to Zookeeper. Using both of these pieces of information, Verspätung computs the delta for each of the consumer groups and reports it to statsd. -### Using +=== Using % java -jar verspaetung-*-all.jar --help usage: verspaetung @@ -32,17 +29,16 @@ Running Verspätung is rather easy, by default the daemon will monitor the standard Kafka high-level consumer offset path of `/consumers` and start reporting deltas automatically. -### Hacking +=== Hacking -* *Running tests:* `./gradlew check` -* *Running the app locally:* `./gradlew run -PzookeeperHosts=localhost:2181` -* *Building the app for distribution:* `./gradlew assemble` +* Running tests: `./gradlew check` +* Running the app locally: `./gradlew run -PzookeeperHosts=localhost:2181` +* Building the app for distribution: `./gradlew assemble` -### Releasing +=== Releasing This is mostly meant for the developer team, but currently releases can be produced by simply pushing a Git tag to this GitHub repository. This will cause Travis CI to build and test the tag, which if it is successful, will -automatically publish to -[Bintray](https://bintray.com/lookout/systems/verspaetung). +automatically publish to link:https://bintray.com/lookout/systems/verspaetung[Bintray]. diff --git a/build.gradle b/build.gradle index 52eb886..786f2ea 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,17 @@ plugins { id "com.jfrog.bintray" version "1.0" id 'com.github.johnrengelman.shadow' version '1.2.0' + id "org.ajoberstar.github-pages" version "1.2.0" + id "org.asciidoctor.gradle.asciidoctor" version "1.5.1" + id 'groovy' + id 'application' } -apply plugin: 'groovy' -apply plugin: 'application' group = "com.github.lookout" description = "A utility for monitoring the delay of Kafka consumers" -version = '0.2.2' +version = '0.3.0' mainClassName = 'com.github.lookout.verspaetung.Main' -defaultTasks 'clean', 'check', 'assemble' +defaultTasks 'check', 'assemble' //////////////////////////////////////////////////////////////////////////////// @@ -70,9 +72,28 @@ dependencies { //////////////////////////////////////////////////////////////////////////////// -jar { - enabled = false +// PUBLISHING/DOCUMENTATION +assemble.dependsOn groovydoc + +asciidoctor { + /* Using a single backend, so skipping the html5/ output dir */ + separateOutputDirs false } +assemble.dependsOn asciidoctor + +githubPages { + repoUri = 'git@github.com:lookout/verspaetung.git' + pages { + into('groovydoc') { from groovydoc } + from asciidoctor + } +} + + +//////////////////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////////////////// shadowJar { exclude 'META-INF/*.RSA', 'META-INF/*.DSA' manifest { @@ -87,6 +108,8 @@ artifacts { archives shadowJar } +/* We're not building a library jar so we'll disable this default jar task */ +jar.enabled = false /* Remove the "library" jar from the archives configuration so it's not * published */ diff --git a/src/docs/asciidoc/index.adoc b/src/docs/asciidoc/index.adoc new file mode 100644 index 0000000..fc3fd09 --- /dev/null +++ b/src/docs/asciidoc/index.adoc @@ -0,0 +1,6 @@ += Verspätung +:toc: right + +== README + +include::../../../README.adoc[]