Skip to content

Commit

Permalink
Merge pull request #335 from RADAR-base/release-0.5.2
Browse files Browse the repository at this point in the history
Release 0.5.2
  • Loading branch information
nivemaham authored Nov 6, 2018
2 parents fefffff + 983ed01 commit 74da892
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 415 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@ node_js:
jdk:
- oraclejdk8
sudo: false

cache:
directories:
- node
- node_modules
- $HOME/.gradle/caches/jars-1
- $HOME/.gradle/caches/jars-2
- $HOME/.gradle/caches/jars-3
- $HOME/.gradle/caches/modules-2/files-2.1/
- $HOME/.gradle/native
- $HOME/.gradle
- $HOME/.yarn-cache

env:
global:
- NODE_VERSION=6.10.0
- SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
- SPRING_JPA_SHOW_SQL=false

before_install:
- jdk_switcher use oraclejdk8
- java -version
Expand All @@ -32,14 +40,17 @@ before_install:
# Repo for Yarn
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install

before_script:
- cp src/test/resources/config/keystore.p12 src/main/resources/config/keystore.p12 # we need the keystore to run our app, and we need our app to run e2e tests
- chmod +x src/test/bash/*.sh
- chmod +x util/*.sh
# Startup the application in the background and continue with the tests
- ./gradlew bootRun 1> /dev/null &

script:
# Make sure we wait for the application to be up, this also ensures the build is finished etc
- ./util/wait-for-app.sh
Expand All @@ -51,8 +62,10 @@ script:
- killall java # stop running MP instance
- ./src/test/bash/run-prod-e2e.sh
- echo "include 'managementportal-client'" >> settings.gradle # make this a sub-project so we can build artifacts and javadoc easily

after_script:
- ./gradlew sendCoverageToCodacy

deploy:
- provider: releases
api_key: ${GH_TOKEN}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d6945ebd1eba4a3fbb55882cda33655e)](https://www.codacy.com/app/RADAR-base/ManagementPortal?utm_source=github.com&utm_medium=referral&utm_content=RADAR-base/ManagementPortal&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/d6945ebd1eba4a3fbb55882cda33655e)](https://www.codacy.com/app/RADAR-base/ManagementPortal?utm_source=github.com&utm_medium=referral&utm_content=RADAR-base/ManagementPortal&utm_campaign=Badge_Coverage)

ManagementPortal is an application which is used to manage pilot studies for [RADAR-CNS](http://www.radar-cns.org/).
ManagementPortal is an application which is used to manage pilot studies for [RADAR-base](http://www.radar-base.org/).

## Table of contents

Expand Down
187 changes: 96 additions & 91 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ buildscript {
classpath "com.moowork.gradle:gradle-node-plugin:1.1.1"
classpath "io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE"
classpath "io.swagger:swagger-codegen:2.2.3"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
//jhipster-needle-gradle-buildscript-dependency - JHipster will add additional gradle build script plugins here
}
}

plugins {
id 'com.jfrog.bintray' version '1.8.0'
id 'com.jfrog.artifactory' version '4.5.4'
}

allprojects {
group 'org.radarcns'

Expand All @@ -47,52 +44,55 @@ allprojects {
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'com.jfrog.artifactory'
ext.githubRepoName = 'RADAR-base/ManagementPortal'

ext {
githubRepoName = 'RADAR-base/ManagementPortal'

ext.githubUrl = 'https://github.com/' + githubRepoName + '.git'
ext.issueUrl = 'https://github.com/' + githubRepoName + '/issues'
ext.website = 'http://radar-cns.org'

ext.pomConfig = {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
githubUrl = 'https://github.com/' + githubRepoName + '.git'
issueUrl = 'https://github.com/' + githubRepoName + '/issues'
website = 'http://radar-base.org'

pomConfig = {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
developers {
developer {
id 'dennyverbeeck'
name 'Denny Verbeeck'
email 'dverbeec@its.jnj.com'
organization 'Janssen R&D'
developers {
developer {
id 'dennyverbeeck'
name 'Denny Verbeeck'
email 'dverbeec@its.jnj.com'
organization 'Janssen R&D'
}
developer {
id 'nivemaham'
name 'Nivethika Mahasivam'
email 'nivethika@thehyve.nl'
organization 'The Hyve'
}
developer {
id 'blootsvoets'
name 'Joris Borgdorff'
email 'joris@thehyve.nl'
organization 'The Hyve'
}
}
developer {
id 'nivemaham'
name 'Nivethika Mahasivam'
email 'nivethika@thehyve.nl'
organization 'The Hyve'
issueManagement {
system 'GitHub'
url githubUrl + '/issues'
}
developer {
id 'blootsvoets'
name 'Joris Borgdorff'
email 'joris@thehyve.nl'
organization 'The Hyve'
organization {
name 'RADAR-base'
url website
}
scm {
connection 'scm:git:' + githubUrl
url githubUrl
}
}
issueManagement {
system 'GitHub'
url githubUrl + '/issues'
}
organization {
name 'RADAR-CNS'
url website
}
scm {
connection 'scm:git:' + githubUrl
url githubUrl
}
}

Expand Down Expand Up @@ -128,6 +128,22 @@ allprojects {
ruleSetFiles = rootProject.files("config/pmd/test_ruleset.xml")
}

artifactory {
contextUrl = 'https://oss.jfrog.org/artifactory'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
password = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
maven = true
}
defaults {
publishArtifacts = true
publishPom = true
properties = ['qa.level': 'basic']
}
}
}
}

sourceCompatibility = '1.8'
Expand Down Expand Up @@ -238,10 +254,10 @@ if (project.hasProperty('graphite')) {
apply from: 'gradle/graphite.gradle'
}

ext.codacyVersion = '2.0.1'

description = ''

ext {
codacyVersion = '4.0.3'
moduleDescription = ''
}

repositories {
mavenCentral()
Expand Down Expand Up @@ -379,22 +395,24 @@ task generateOpenApiSpec(dependsOn: 'classes', group: 'Swagger',
swaggerFile.getParentFile().mkdirs();

def generated = false
def tries = 0
def MAX_TRIES = 20

println()
while (!generated) {
for (def i = 0; i < 20; i++) {
ProcessBuilder curlPb = new ProcessBuilder("curl", apiDocsEndpoint, "-o",
swaggerFileLocation, "--connect-timeout", "1")
curlPb.directory(projectDir)
Process curlProcess = curlPb.start()
curlProcess.waitFor()
generated = curlProcess.exitValue() == 0
if (!generated) {
System.out.print("#")
System.out.flush()
sleep(5000)
if (generated) {
break
}
System.out.print("#")
System.out.flush()
sleep(5000)
}
if (!generated) {
throw new GradleException('Swagger file could not be generated')
}
println()
println("Swagger file generated at " + swaggerFileLocation)
Expand Down Expand Up @@ -422,7 +440,7 @@ task generateJavaClient(dependsOn: 'generateOpenApiSpec', group: 'Swagger',
'apiPackage' : 'org.radarcns.management.client.api',
'modelPackage' : 'org.radarcns.management.client.model',
'appName' : rootProject.name,
'appDescription': description,
'appDescription': moduleDescription,
'licenceUrl' : 'http://apache.org/licenses/LICENSE-2.0.html'
])
new DefaultGenerator().opts(config.toClientOptInput()).generate()
Expand All @@ -437,12 +455,13 @@ jacocoTestReport {
csv.enabled false
html.enabled true
}
dependsOn test
}

task sendCoverageToCodacy(type: JavaExec, dependsOn: jacocoTestReport) {
main = 'com.codacy.CodacyCoverageReporter'
classpath = configurations.codacy
args = ['-l', 'Java', '-r', "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"]
args = ['report', '-l', 'Java', '-r', "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"]
}

ext.sharedManifest = manifest {
Expand All @@ -466,43 +485,36 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
manifest.from sharedManifest
}

// add javadoc/source jar tasks as artifacts
artifacts {
archives javadocJar
archives sourcesJar
}


publishing {
publications {
ManagementPortalPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId project.name
version project.version

pom {
description = moduleDescription
name = project.name
url = githubUrl
}

pom.withXml {
def root = asNode()
root.appendNode('description', description)
root.appendNode('name', project.name)
root.appendNode('url', githubUrl)
root.children().last() + pomConfig
asNode().children().last() + pomConfig
}
}
}
}

bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
override = false
publications = ['ManagementPortalPublication']
user project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
override false
publications 'ManagementPortalPublication'
pkg {
repo = project.group
name = project.name
userOrg = 'radar-cns'
desc = description
desc = moduleDescription
licenses = ['Apache-2.0']
websiteUrl = website
issueTrackerUrl = issueUrl
Expand All @@ -511,28 +523,21 @@ bintray {
githubReleaseNotesFile = 'README.md'
version {
name = project.version
desc = description
desc = moduleDescription
vcsTag = System.getenv('TRAVIS_TAG')
released = new Date()
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
}
}
}
}


artifactory {
contextUrl = 'https://oss.jfrog.org/artifactory'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
password = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
maven = true
}
}
}
bintrayUpload.dependsOn 'assembleRelease'

artifactoryPublish {
publications('ManagementPortalPublication')
publications 'ManagementPortalPublication'
dependsOn 'assemble'
}

task downloadDependencies {
Expand Down
Loading

0 comments on commit 74da892

Please sign in to comment.