From 063ac889b58e9df9f6b13e1931eb10db6943ea6f Mon Sep 17 00:00:00 2001 From: Mustapha Zorgati <15628173+mustaphazorgati@users.noreply.github.com> Date: Tue, 21 Jan 2020 16:34:57 +0100 Subject: [PATCH] Revert "TSK-369: disabled sonartype for pull requests because of incompatibility" This reverts commit bec6c2949cccc4cc87af4fe4d489109bfd1001cb. --- .travis.yml | 30 +++++++++++++++--------------- ci/test.sh | 21 +++++++++------------ 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index b0c69cc96..f21ed9c5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,8 +43,8 @@ env: - DB=POSTGRES_10_4 install: skip -script: ci/test.sh "$DB" "$([ "false" = "$TRAVIS_PULL_REQUEST" ] && echo "$SONAR_PROJECT_KEY")" -before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" +script: ci/test.sh $DB +before_cache: rm -rf $HOME/.m2/repository/pro/taskana jobs: include: @@ -53,8 +53,8 @@ jobs: node_js: $NODE_VERSION install: skip env: DB=WEB - script: ci/test.sh "$DB" - before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + script: ci/test.sh $DB + before_cache: rm -rf $HOME/.m2/repository/pro/taskana # We are using the environment variable 'MODULE' to force travis into using a different cache for each build. # See https://docs.travis-ci.com/user/caching/#caches-and-build-matrices for detailed information on @@ -65,38 +65,38 @@ jobs: node_js: $NODE_VERSION install: skip env: MODULE=WEB - script: ci/compile.sh "$MODULE" - before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + script: ci/compile.sh $MODULE + before_cache: rm -rf $HOME/.m2/repository/pro/taskana - stage: Compile name: taskana-lib install: skip env: MODULE=LIB - script: ci/compile.sh "$MODULE" - before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + script: ci/compile.sh $MODULE + before_cache: rm -rf $HOME/.m2/repository/pro/taskana - stage: Compile name: taskana-rest install: skip env: MODULE=REST - script: ci/compile.sh "$MODULE" - before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + script: ci/compile.sh $MODULE + before_cache: rm -rf $HOME/.m2/repository/pro/taskana - stage: Compile name: taskana-simplehistory install: skip env: MODULE=HISTORY - script: ci/compile.sh "$MODULE" - before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + script: ci/compile.sh $MODULE + before_cache: rm -rf $HOME/.m2/repository/pro/taskana - stage: Release / Deploy name: release / deploy / commit before_install: | openssl aes-256-cbc -K "$encrypted_21a5d40e43a3_key" -iv "$encrypted_21a5d40e43a3_iv" \ -in "ci/codesigning.asc.enc" -out "ci/codesigning.asc" -d && gpg --import "ci/codesigning.asc" \ - && nvm install "$NODE_VERSION" + && nvm install $NODE_VERSION install: ci/change_version.sh -m . - && ( cd web && npm install ) + && ( cd web && npm install --silent ) && ( cd web && npm run build:prod-silent ) && mvn -q install -T 4C -am -DskipTests -Dcheckstyle.skip -pl :taskana-rest-spring-example-boot,:taskana-cdi && mvn -q prepare-package -pl :taskana-rest-spring @@ -108,7 +108,7 @@ jobs: --settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip -pl !:taskana-spring-example,!:taskana-cdi-example,\ !:taskana-rest-spring-example-boot,!:taskana-rest-spring-example-wildfly,\ !:taskana-simplehistory-spring-test,!:taskana-simplehistory-rest-spring-example - before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + before_cache: rm -rf $HOME/.m2/repository/pro/taskana after_success: ci/change_version.sh -i -m . && ci/commitPoms.sh deploy: provider: cloudfoundry diff --git a/ci/test.sh b/ci/test.sh index d8e884e0a..90bbbc6f1 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -6,7 +6,7 @@ set -e # fail fast #H #H prints this help and exits #H -#H test.sh [sonar project key] +#H test.sh #H #H tests the taskana application. See documentation for further testing details. #H @@ -17,9 +17,8 @@ set -e # fail fast #H - POSTGRES_10_4 #H module: #H - HISTORY -#H sonar project key: -#H the key of the sonarqube project where the coverage will be sent to. -#H If empty nothing will be sent +#H Optional: +#H SONAR_PROJECT_KEY - configured in travis env # Arguments: # $1: exit code function helpAndExit() { @@ -35,14 +34,12 @@ function main() { set -x eval "$REL/prepare_db.sh '$1'" # We can not use the fance '-f' maven option due to a bug in arquillian. See https://issues.jboss.org/browse/THORN-2049 - (cd $REL/.. && mvn -q install -B -T 4C -am -Pcoverage -Dmaven.javadoc.skip -Dcheckstyle.skip) - - # disabling sonarqube for PRs because it's not supported yet. See https://jira.sonarsource.com/browse/MMF-1371 - if [ -n "$2" ]; then - #-Pcoverage to activate jacoco and test coverage reports - # send test coverage and build information to sonarcloud - mvn sonar:sonar -f $REL/.. -Pcoverage -Dsonar.projectKey="$2" - fi + #-Pcoverage to activate jacoco and test coverage reports + # send test coverage and build information to sonarcloud + (cd $REL/.. \ + && mvn -q install -B -T 4C -am -Pcoverage -Dmaven.javadoc.skip -Dcheckstyle.skip \ + && mvn sonar:sonar -Pcoverage -Dsonar.projectKey="$SONAR_PROJECT_KEY" + ) ;; DB2_10_5 | DB2_11_1) set -x