Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
BUG-97298 fix reckon
Browse files Browse the repository at this point in the history
  • Loading branch information
sodre90 committed Apr 5, 2018
1 parent b710744 commit b26593e
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 80 deletions.
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ buildscript {
dependencies {
classpath 'org.ajoberstar:grgit:2.1.0'
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.11'
classpath 'org.ajoberstar.reckon:reckon-gradle:0.4.0'
classpath 'com.smokejumperit.gradle.license:Gradle-License-Report:0.0.2'
}
}

plugins {
id 'org.ajoberstar.grgit' version '2.1.0'
id 'org.ajoberstar.reckon' version '0.3.0'
}

reckon {
normal = scopeFromProp()
preRelease = stageFromProp('dev', 'rc', 'final')
if (project.hasProperty("reckon.scope")) {
apply plugin: "org.ajoberstar.reckon"
reckon {
normal = scopeFromProp()
preRelease = stageFromProp('dev', 'rc', 'final')
}
}

def env = project.hasProperty('env') ? project.getProperty('env') : 'local'
Expand Down
151 changes: 78 additions & 73 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.ajoberstar.grgit.Grgit

buildscript {
repositories {
maven { url 'http://repo.spring.io/libs-release' }
Expand Down Expand Up @@ -40,78 +42,78 @@ jar {

dependencies {

compile("com.sequenceiq:${ambariClientName}:${ambariClientVersion}") {
exclude group: 'org.slf4j';
}
compile("com.sequenceiq:${ambariClientName}:${ambariClientVersion}") {
exclude group: 'org.slf4j';
}

compile group: 'org.springframework.retry', name: 'spring-retry', version: '1.2.0.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-websocket', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jersey', version: springBootVersion
compile (group: 'org.springframework.statemachine', name: 'spring-statemachine-core', version: '1.0.1.RELEASE') { exclude group: 'org.springframework' }
compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: springOauthVersion
compile group: 'io.projectreactor', name: 'reactor-core', version: eventBusVersion
compile group: 'io.projectreactor', name: 'reactor-bus', version: eventBusVersion
compile group: 'org.hibernate', name: 'hibernate-validator', version: hibernateValidatorVersion
compile group: 'org.hibernate', name: 'hibernate-core', version: hibernateCoreVersion
compile group: 'org.apache.commons', name: 'commons-lang3', version: apacheCommonsLangVersion
compile group: 'org.freemarker', name: 'freemarker', version: freemarkerVersion
compile group: 'org.postgresql', name: 'postgresql', version: '9.4.1212'
compile group: 'org.codehaus.jettison', name: 'jettison', version: '1.3.5'
compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.7'
compile group: 'com.github.fommil', name: 'openssh', version: '1.0'
compile group: 'javax.mail', name: 'mail', version: '1.5.0-b01'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: bouncycastleVersion
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: bouncycastleVersion
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-multipart', version: jerseyCoreVersion

compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.5.0'
compile group: 'io.springfox', name: 'springfox-core', version: '2.5.0'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.5.0'


compile group: 'org.springframework.kafka', name: 'spring-kafka', version: '2.1.2.RELEASE'
compile group: 'io.swagger', name: 'swagger-jersey2-jaxrs', version: swaggerVersion
compile group: 'com.google.http-client', name: 'google-http-client-jackson2', version: '1.22.0'
compile (group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.22.0') { exclude module: 'servlet-api' }
compile group: 'com.hierynomus', name: 'sshj', version: '0.15.0'
compile group: 'dnsjava', name: 'dnsjava', version: '2.1.7'
compile group: 'com.icegreen', name: 'greenmail', version: '1.4.1'
compile group: 'org.mybatis', name: 'mybatis-migrations', version: '3.2.0'
compile group: 'com.cedarsoftware', name: 'json-io', version: '4.9.12'
compile group: 'com.github.jknack', name: 'handlebars', version: '4.0.6'
compile group: 'com.google.code.findbugs', name: 'annotations', version: '3.0.1'

compile project(':core-model')
compile project(':orchestrator-api')
compile project(':cloud-reactor-api')
compile project(':cloud-reactor')
compile project(':structuredevent-model')

runtime project(':orchestrator-salt')
runtime project(':orchestrator-yarn')
runtime project(':cloud-reactor')
runtime project(':cloud-openstack')
runtime project(':cloud-gcp')
runtime project(':cloud-aws')
runtime project(':cloud-mock')
runtime project(':cloud-azure')
runtime project(':cloud-yarn')


runtime group: 'activation', name: 'activation', version: '1.0.2'

testCompile project(path: ':core-model', configuration: 'tests')
testCompile group: 'org.springframework.boot', name:'spring-boot-starter-test', version:springBootVersion
testCompile group: 'org.springframework.boot', name:'spring-boot-starter-freemarker', version:springBootVersion
testCompile group: 'com.jayway.restassured', name: 'rest-assured', version: '2.3.4'
testCompile group: 'com.jayway.restassured', name: 'json-path', version: '2.3.4'
compile group: 'org.springframework.retry', name: 'spring-retry', version: '1.2.0.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-websocket', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jersey', version: springBootVersion
compile (group: 'org.springframework.statemachine', name: 'spring-statemachine-core', version: '1.0.1.RELEASE') { exclude group: 'org.springframework' }
compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: springOauthVersion
compile group: 'io.projectreactor', name: 'reactor-core', version: eventBusVersion
compile group: 'io.projectreactor', name: 'reactor-bus', version: eventBusVersion
compile group: 'org.hibernate', name: 'hibernate-validator', version: hibernateValidatorVersion
compile group: 'org.hibernate', name: 'hibernate-core', version: hibernateCoreVersion
compile group: 'org.apache.commons', name: 'commons-lang3', version: apacheCommonsLangVersion
compile group: 'org.freemarker', name: 'freemarker', version: freemarkerVersion
compile group: 'org.postgresql', name: 'postgresql', version: '9.4.1212'
compile group: 'org.codehaus.jettison', name: 'jettison', version: '1.3.5'
compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.7'
compile group: 'com.github.fommil', name: 'openssh', version: '1.0'
compile group: 'javax.mail', name: 'mail', version: '1.5.0-b01'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: bouncycastleVersion
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: bouncycastleVersion
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-multipart', version: jerseyCoreVersion

compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.5.0'
compile group: 'io.springfox', name: 'springfox-core', version: '2.5.0'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.5.0'


compile group: 'org.springframework.kafka', name: 'spring-kafka', version: '2.1.2.RELEASE'
compile group: 'io.swagger', name: 'swagger-jersey2-jaxrs', version: swaggerVersion
compile group: 'com.google.http-client', name: 'google-http-client-jackson2', version: '1.22.0'
compile (group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.22.0') { exclude module: 'servlet-api' }
compile group: 'com.hierynomus', name: 'sshj', version: '0.15.0'
compile group: 'dnsjava', name: 'dnsjava', version: '2.1.7'
compile group: 'com.icegreen', name: 'greenmail', version: '1.4.1'
compile group: 'org.mybatis', name: 'mybatis-migrations', version: '3.2.0'
compile group: 'com.cedarsoftware', name: 'json-io', version: '4.9.12'
compile group: 'com.github.jknack', name: 'handlebars', version: '4.0.6'
compile group: 'com.google.code.findbugs', name: 'annotations', version: '3.0.1'

compile project(':core-model')
compile project(':orchestrator-api')
compile project(':cloud-reactor-api')
compile project(':cloud-reactor')
compile project(':structuredevent-model')

runtime project(':orchestrator-salt')
runtime project(':orchestrator-yarn')
runtime project(':cloud-reactor')
runtime project(':cloud-openstack')
runtime project(':cloud-gcp')
runtime project(':cloud-aws')
runtime project(':cloud-mock')
runtime project(':cloud-azure')
runtime project(':cloud-yarn')


runtime group: 'activation', name: 'activation', version: '1.0.2'

testCompile project(path: ':core-model', configuration: 'tests')
testCompile group: 'org.springframework.boot', name:'spring-boot-starter-test', version:springBootVersion
testCompile group: 'org.springframework.boot', name:'spring-boot-starter-freemarker', version:springBootVersion
testCompile group: 'com.jayway.restassured', name: 'rest-assured', version: '2.3.4'
testCompile group: 'com.jayway.restassured', name: 'json-path', version: '2.3.4'

}

Expand Down Expand Up @@ -163,8 +165,11 @@ class BuildInfoTask extends DefaultTask {
destination.mkdirs()
String activeProfile = determineActiveProfile()

if (buildVersion.contains("+")) {
buildVersion = buildVersion.tokenize('+')[0]
// if using dev environment this condition is true
if (buildVersion.contains("+") || buildVersion == "unspecified") {
def grgit = Grgit.open(currentDir: project.projectDir)
buildVersion = grgit.describe()
println "buildVersion from git: " + buildVersion
}
new File(destination, "build.info").withWriter { out ->
[
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-dev.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash -e
: ${WORKSPACE=.}

#./gradlew -Penv=jenkins -b build.gradle clean build uploadArchives -Preckon.scope=minor -Preckon.stage=dev --info --stacktrace --parallel

LATEST_RC_BRANCH=$(git branch --sort=-committerdate -r | grep 'origin/rc' | head -n 1)
LATEST_RC_MAJOR_MINOR_VERSION=$(echo "$LATEST_RC_BRANCH" | cut -d'-' -f 2)
LATEST_RC_MAJOR=$(echo $LATEST_RC_MAJOR_MINOR_VERSION | cut -d'.' -f 1)
Expand All @@ -22,5 +20,7 @@ fi;
git tag -a $VERSION -m "$VERSION"
git push origin $VERSION

./gradlew -Penv=jenkins -b build.gradle clean build uploadArchives -Preckon.scope=patch -Preckon.stage=dev --info --stacktrace --parallel

echo "Computed next dev version: $VERSION"
echo VERSION=$VERSION > $WORKSPACE/version
2 changes: 1 addition & 1 deletion scripts/build-rc-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi;
git tag -a $VERSION -m "$VERSION"
git push origin $VERSION

./gradlew -Penv=jenkins -b build.gradle clean build uploadArchives -Preckon.scope=patch -Preckon.stage=rc --info --stacktrace --parallel
./gradlew -Penv=jenkins -b build.gradle clean build uploadArchives -x findbugsMain -x findbugsTest --info --stacktrace --parallel

echo "Computed next rc version: $VERSION"
echo VERSION=$VERSION > $WORKSPACE/version

0 comments on commit b26593e

Please sign in to comment.