From 7e9cb2c1f10a82d8884feda6ef82948fc2eae039 Mon Sep 17 00:00:00 2001 From: Tim Weber Date: Mon, 1 Apr 2019 17:24:44 +0200 Subject: [PATCH] Try tricking Jenkins into using --- Jenkinsfile | 82 ++++++++++++++++++++++++----------------------- gradle.properties | 2 +- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cee84605..eb16fc05 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,51 +1,53 @@ #!/usr/bin/env groovy node { - stage('checkout') { - checkout scm - } - - stage('check java') { - sh "java -version" - } - - stage('clean') { - sh "chmod +x gradlew" - sh "./gradlew clean --no-daemon" - } - - stage('npm install') { - sh "./gradlew npm_install -PnodeInstall --no-daemon" - } - - stage('backend tests') { - try { - sh "./gradlew test -PnodeInstall --no-daemon" - } catch(err) { - throw err - } finally { - junit '**/build/**/TEST-*.xml' + withEnv(["PATH=$HOME/bin:$PATH"]) { + stage('checkout') { + checkout scm } - } - stage('frontend tests') { - try { - sh "./gradlew npm_run_test -PnodeInstall --no-daemon" - } catch(err) { - throw err - } finally { - junit '**/build/test-results/TESTS-*.xml' + stage('check java') { + sh "java -version" } - } - stage('packaging') { - sh "./gradlew bootWar -x test -Pprod -PnodeInstall --no-daemon" - archiveArtifacts artifacts: '**/build/libs/*.war', fingerprint: true - } + stage('clean') { + sh "chmod +x gradlew" + sh "./gradlew clean --no-daemon" + } - stage('quality analysis') { - withSonarQubeEnv('sonar') { - sh "./gradlew sonarqube --no-daemon" + stage('npm install') { + sh "./gradlew npm_install -PnodeInstall --no-daemon" + } + + stage('backend tests') { + try { + sh "./gradlew test -PnodeInstall --no-daemon" + } catch (err) { + throw err + } finally { + junit '**/build/**/TEST-*.xml' + } + } + + stage('frontend tests') { + try { + sh "./gradlew npm_run_test -PnodeInstall --no-daemon" + } catch (err) { + throw err + } finally { + junit '**/build/test-results/TESTS-*.xml' + } + } + + stage('packaging') { + sh "./gradlew bootWar -x test -Pprod -PnodeInstall --no-daemon" + archiveArtifacts artifacts: '**/build/libs/*.war', fingerprint: true + } + + stage('quality analysis') { + withSonarQubeEnv('sonar') { + sh "./gradlew sonarqube --no-daemon" + } } } } diff --git a/gradle.properties b/gradle.properties index 8e512358..7aaae4ac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ rootProject.name=hsadmin-ng profile=dev # Build properties -node_version=10.15.0 +node_version=10.15.3 npm_version=6.4.1 yarn_version=1.13.0