diff --git a/.gitignore b/.gitignore index 9aed94b..4f2d07b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .gradle .idea *.iml -build \ No newline at end of file +build +supervisord.* diff --git a/.travis.yml b/.travis.yml index 8a7869b..e398537 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,8 @@ deploy: provider: releases api_key: secure: cJXGWKeSLTYVOu80myYTskhCCDDSlKyrwZAhALAk5snq+r2YBlJJerOrhWTRhVk7NeKw1habdWNQu1tnZfWRyAs1fNYS/VFGqMZK6pL7h1as0Zw3zGEJs3gQ5d9lrWknS/R19qsaXHMjAeC+TRU6EauVnDuwMeEZTaZwPhsATi0= - file: build/libs/xlr-flowdock-plugin-1.0.2.jar + file_glob: true + file: build/libs/* skip_cleanup: true on: all_branches: true diff --git a/README.md b/README.md index cad8867..7760987 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,11 @@ This document describes the functionality provided by the XL Release Flowdock pl See the [XL Release Documentation](https://docs.xebialabs.com/xl-release/) for background information on XL Release and release orchestration concepts. -# CI status # - [![Build Status][xlr-flowdock-plugin-travis-image] ][xlr-flowdock-plugin-travis-url] [![Codacy][xlr-flowdock-plugin-codacy-image] ][xlr-flowdock-plugin-codacy-url] [![Code Climate][xlr-flowdock-plugin-code-climate-image] ][xlr-flowdock-plugin-code-climate-url] [![License: MIT][xlr-flowdock-plugin-license-image] ][xlr-flowdock-plugin-license-url] - +[![Github All Releases][xlr-flowdock-plugin-downloads-image] ]() [xlr-flowdock-plugin-travis-image]: https://travis-ci.org/xebialabs-community/xlr-flowdock-plugin.svg?branch=master [xlr-flowdock-plugin-travis-url]: https://travis-ci.org/xebialabs-community/xlr-flowdock-plugin @@ -20,6 +18,7 @@ See the [XL Release Documentation](https://docs.xebialabs.com/xl-release/) for b [xlr-flowdock-plugin-code-climate-url]: https://codeclimate.com/github/xebialabs-community/xlr-flowdock-plugin [xlr-flowdock-plugin-license-image]: https://img.shields.io/badge/License-MIT-yellow.svg [xlr-flowdock-plugin-license-url]: https://opensource.org/licenses/MIT +[xlr-flowdock-plugin-downloads-image]: https://img.shields.io/github/downloads/xebialabs-community/xlr-flowdock-plugin/total.svg @@ -30,7 +29,7 @@ The XL Release Flowdock plugin is a XL Release plugin that adds capability for s # Requirements # * **Requirements** - * **XL Release** 4.8.0 + * **XL Release** 6.0.x+ # Installation # @@ -38,11 +37,9 @@ Place the plugin JAR file into your `SERVER_HOME/plugins` directory. # Usage # -1. Go to `Settings - Configuration - Flowdock: Configuration` - ![Flowdock configuration part 1](images/Flowdock_configuration_1.png?raw=true "Flowdock configuration part 1") +1. Go to `Settings - Shared configuration - Flowdock: Configuration` 2. Add a new configuration - ![Flowdock configuration part 2](images/Flowdock_configuration_2.png?raw=true "Flowdock configuration part 2") 3. Provide Title (Can be anything), API url (eg: https://api.flowdock.com), Flow token (See your Flow configuration in Flowdock) and enable or disable the Flowdock configuration. - ![Flowdock configuration part 3](images/Flowdock_configuration_3.png?raw=true "Flowdock configuration part 3") + ![Flowdock configuration](images/Flowdock_configuration.png?raw=true "Flowdock configuration") 4. Each time XL Release stores something into the Activity logs, this will also be send to Flowdock. diff --git a/build.gradle b/build.gradle index 247fc97..a4c364f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,7 @@ plugins { - id "com.github.hierynomus.license" version "0.13.1" + id "com.github.hierynomus.license" version "0.14.0" + id "com.xebialabs.xl.docker" version "1.1.0" + id 'nebula.release' version '6.0.0' } apply plugin: 'java' @@ -7,8 +9,24 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'maven' -version = '1.0.2' -def apiVersion = '2017.1.0' +xlDocker { + compileImage = 'xebialabs/xlr_dev_compile' + compileVersion = 'v7.2.0.2' + runImage = 'xebialabs/xlr_dev_run' + runVersion = 'v7.2.0.1' + runPortMapping = '15516:5516' +} + +def apiVersion = '2017.6.0' + +if (!project.hasProperty('release.scope')) { + project.ext['release.scope'] = 'patch' +} + +if (!project.hasProperty('release.useLastTag')) { + project.ext['release.useLastTag'] = true +} + repositories { mavenLocal() diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 8eef7fe..27768f1 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6f23c03..92165ee 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Mar 17 10:51:00 PDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip diff --git a/gradlew b/gradlew index 27309d9..cccdd3d 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index f6d5974..e95643d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -49,7 +49,6 @@ goto fail @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/images/Flowdock_configuration.png b/images/Flowdock_configuration.png new file mode 100644 index 0000000..de69ce7 Binary files /dev/null and b/images/Flowdock_configuration.png differ diff --git a/images/Flowdock_configuration_1.png b/images/Flowdock_configuration_1.png deleted file mode 100644 index 1fba2a7..0000000 Binary files a/images/Flowdock_configuration_1.png and /dev/null differ diff --git a/images/Flowdock_configuration_2.png b/images/Flowdock_configuration_2.png deleted file mode 100644 index d06bdd3..0000000 Binary files a/images/Flowdock_configuration_2.png and /dev/null differ diff --git a/images/Flowdock_configuration_3.png b/images/Flowdock_configuration_3.png deleted file mode 100644 index 42ec2e4..0000000 Binary files a/images/Flowdock_configuration_3.png and /dev/null differ diff --git a/src/main/java/com/xebialabs/xlrelease/flowdock/plugin/TeamInboxMessage.java b/src/main/java/com/xebialabs/xlrelease/flowdock/plugin/TeamInboxMessage.java index 86ff957..ea00c47 100644 --- a/src/main/java/com/xebialabs/xlrelease/flowdock/plugin/TeamInboxMessage.java +++ b/src/main/java/com/xebialabs/xlrelease/flowdock/plugin/TeamInboxMessage.java @@ -64,8 +64,8 @@ public static TeamInboxMessage fromAuditableDeployitEvent(ConfigurationItem ci) TeamInboxMessage msg = new TeamInboxMessage(); StringBuffer content = new StringBuffer(); content.append("XL Release event for ").append(ci.getId()); - content.append(" with message ").append((char[])ci.getProperty("message")); - content.append(" from user ").append((char[])ci.getProperty("username")); + content.append(" with message ").append((String)ci.getProperty("message")); + content.append(" from user ").append((String)ci.getProperty("username")); msg.setContent(content.toString()); msg.setSubject("XL Release event");