Only use Travis for SonarQube
This commit is contained in:
committed by
Petri Tuomola
parent
f8a0a8d5cd
commit
70e3b4e0db
+2
-28
@@ -23,16 +23,7 @@ dist: bionic
|
|||||||
|
|
||||||
language: generic
|
language: generic
|
||||||
|
|
||||||
services:
|
|
||||||
- mysql
|
|
||||||
- docker
|
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- curl
|
|
||||||
- graphviz
|
|
||||||
- gv
|
|
||||||
sonarcloud:
|
sonarcloud:
|
||||||
organization: "apache"
|
organization: "apache"
|
||||||
token:
|
token:
|
||||||
@@ -57,13 +48,8 @@ install:
|
|||||||
- curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
|
- curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
|
||||||
- sudo apt-get -yq install ./zulu-repo_1.0.0-3_all.deb
|
- sudo apt-get -yq install ./zulu-repo_1.0.0-3_all.deb
|
||||||
- sudo apt-get -q update
|
- sudo apt-get -q update
|
||||||
- sudo apt-get -yq install zulu17-jdk
|
- sudo apt-get -yq install zulu11-jdk
|
||||||
- export JAVA_HOME=/usr/lib/jvm/zulu17
|
- export JAVA_HOME=/usr/lib/jvm/zulu11
|
||||||
- echo "USE mysql;\nALTER USER 'root'@'localhost' IDENTIFIED BY 'mysql';\n" | mysql -u root
|
|
||||||
- mysql -u root -pmysql -e 'CREATE DATABASE IF NOT EXISTS `fineract_tenants`;'
|
|
||||||
- mysql -u root -pmysql -e 'CREATE DATABASE IF NOT EXISTS `fineract_default`;'
|
|
||||||
# Hardcoding the time zone is a temporary fix for https://issues.apache.org/jira/browse/FINERACT-723
|
|
||||||
- export TZ=Asia/Kolkata
|
|
||||||
|
|
||||||
# https://docs.travis-ci.com/user/languages/java/#caching
|
# https://docs.travis-ci.com/user/languages/java/#caching
|
||||||
before_cache:
|
before_cache:
|
||||||
@@ -86,20 +72,8 @@ before_script:
|
|||||||
- javac -version
|
- javac -version
|
||||||
- $JAVA_HOME/bin/java -version
|
- $JAVA_HOME/bin/java -version
|
||||||
|
|
||||||
# NOTE: We used to run with --info, which is quite a bit more verbose, but is VERY useful to understand failures on Travis,
|
|
||||||
# where you do not have access to any files like build/reports/tests/index.html, only the Console.
|
|
||||||
# @see http://mrhaki.blogspot.ch/2013/05/gradle-goodness-show-more-information.html
|
|
||||||
# @see http://forums.gradle.org/gradle/topics/whats_new_in_gradle_1_1_test_logging for alternative
|
|
||||||
# https://jira.apache.org/jira/browse/FINERACT-732 removed that again, because it made Travis CI fail.
|
|
||||||
script:
|
script:
|
||||||
- date
|
- date
|
||||||
# using "&&" instead of several "-" means that integrationTest does not run if test fails,
|
|
||||||
# and Docker test does not run if integration test fails, which makes PR failure easier to understand.
|
|
||||||
# @see https://docs.travis-ci.com/user/job-lifecycle/#customizing-the-build-phase
|
|
||||||
# We stop the mysql system service when running the Docker test to avoid port 3306 conflicts (unless we run the mysql in docker-compose on another port; req. FINERACT-773)
|
|
||||||
# The fancy /actuator/info test makes sure that has more than 100 characters of JSON to test that the git.properties worked (see FINERACT-983)
|
|
||||||
- ./gradlew -q --no-daemon --console=plain licenseMain licenseTest check build test --fail-fast doc && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 60s && curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health && (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
|
|
||||||
- date
|
|
||||||
# Using travis_wait for a proccess that could take longer than 20 minutes, in this case the SonaQube analysis
|
# Using travis_wait for a proccess that could take longer than 20 minutes, in this case the SonaQube analysis
|
||||||
# https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
|
# https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
|
||||||
- travis_wait 30 ./gradlew -q --no-daemon --console=plain -x rat -x test sonarqube -Pcoverage=true
|
- travis_wait 30 ./gradlew -q --no-daemon --console=plain -x rat -x test sonarqube -Pcoverage=true
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ openApiMeta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openApiValidate {
|
openApiValidate {
|
||||||
inputSpec = "$swaggerFile"
|
inputSpec = "file://$swaggerFile"
|
||||||
recommend = true
|
recommend = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateT
|
|||||||
verbose = false
|
verbose = false
|
||||||
validateSpec = false
|
validateSpec = false
|
||||||
skipValidateSpec = true
|
skipValidateSpec = true
|
||||||
inputSpec = "$swaggerFile"
|
inputSpec = "file://$swaggerFile"
|
||||||
outputDir = "$buildDir/generated/java".toString()
|
outputDir = "$buildDir/generated/java".toString()
|
||||||
templateDir = "$rootDir/fineract-client/src/main/resources/java/template/"
|
templateDir = "$rootDir/fineract-client/src/main/resources/java/template/"
|
||||||
groupId = 'org.apache.fineract'
|
groupId = 'org.apache.fineract'
|
||||||
@@ -58,7 +58,7 @@ task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateT
|
|||||||
ignoreFileOverride = "$projectDir/.openapi-generator-ignore"
|
ignoreFileOverride = "$projectDir/.openapi-generator-ignore"
|
||||||
// trick to make sure fineract.yaml is generated first
|
// trick to make sure fineract.yaml is generated first
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
':fineract-provider:compileJava'
|
':fineract-provider:resolve'
|
||||||
]
|
]
|
||||||
finalizedBy = [licenseFormat]
|
finalizedBy = [licenseFormat]
|
||||||
// uncomment below block to automatically copy the custom files in generated SDK
|
// uncomment below block to automatically copy the custom files in generated SDK
|
||||||
@@ -73,7 +73,7 @@ task buildTypescriptAngularSdk(type: org.openapitools.generator.gradle.plugin.ta
|
|||||||
verbose = false
|
verbose = false
|
||||||
validateSpec = false
|
validateSpec = false
|
||||||
skipValidateSpec = true
|
skipValidateSpec = true
|
||||||
inputSpec = "$swaggerFile"
|
inputSpec = "file://$swaggerFile"
|
||||||
outputDir = "$buildDir/generated/typescript".toString()
|
outputDir = "$buildDir/generated/typescript".toString()
|
||||||
apiPackage = 'org.apache.fineract.client.services'
|
apiPackage = 'org.apache.fineract.client.services'
|
||||||
invokerPackage = 'org.apache.fineract.client'
|
invokerPackage = 'org.apache.fineract.client'
|
||||||
@@ -84,6 +84,9 @@ task buildTypescriptAngularSdk(type: org.openapitools.generator.gradle.plugin.ta
|
|||||||
ngVersion: '10.0.0',
|
ngVersion: '10.0.0',
|
||||||
npmName: 'apache-fineract-client'
|
npmName: 'apache-fineract-client'
|
||||||
]
|
]
|
||||||
|
dependsOn = [
|
||||||
|
':fineract-provider:resolve'
|
||||||
|
]
|
||||||
finalizedBy = [licenseFormat]
|
finalizedBy = [licenseFormat]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user