aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--Jenkinsfile38
-rw-r--r--pom.xml16
-rwxr-xr-xtravis.sh4
4 files changed, 39 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml
index ba0ed7c..82f96a1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,6 @@
language: java
sudo: false
-install: true
-jdk:
-- oraclejdk8
+jdk: openjdk11
script: "./travis.sh"
cache:
directories:
diff --git a/Jenkinsfile b/Jenkinsfile
index ff92f23..3e48c64 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -11,7 +11,8 @@ pipeline {
}
environment {
SONARSOURCE_QA = 'true'
- MAVEN_TOOL = 'Maven 3.3.x'
+ MAVEN_TOOL = 'Maven 3.5.x'
+ JDK_VERSION = 'Java 11'
}
stages {
stage('Notify') {
@@ -60,8 +61,10 @@ pipeline {
label 'windows'
}
steps {
- withMaven(maven: MAVEN_TOOL) {
- sh 'mvn.cmd clean test'
+ withQAEnv {
+ withMaven(maven: MAVEN_TOOL) {
+ sh 'mvn.cmd clean test'
+ }
}
}
}
@@ -86,25 +89,28 @@ pipeline {
}
def runITs(String sqRuntimeVersion) {
- withQAEnv {
- withMaven(maven: MAVEN_TOOL) {
- mavenSetBuildVersion()
- dir('its') {
- nodejs('NodeJS 10.4.1') {
- def mvn = isUnix() ? 'mvn' : 'mvn.cmd'
- sh "${mvn} ${itBuildArguments sqRuntimeVersion}"
- }
- }
+ withQAEnv {
+ nodejs(configId: 'npm-artifactory', nodeJSInstallationName: 'NodeJS latest') {
+ withMaven(maven: MAVEN_TOOL) {
+ mavenSetBuildVersion()
+ dir('its') {
+ def mvn = isUnix() ? 'mvn' : 'mvn.cmd'
+ sh "${mvn} ${itBuildArguments sqRuntimeVersion}"
}
+ }
}
+ }
}
def withQAEnv(def body) {
checkout scm
- withCredentials([string(credentialsId: 'ARTIFACTORY_PRIVATE_API_KEY', variable: 'ARTIFACTORY_API_KEY'),
- usernamePassword(credentialsId: 'ARTIFACTORY_PRIVATE_USER', passwordVariable: 'ARTIFACTORY_PRIVATE_PASSWORD', usernameVariable: 'ARTIFACTORY_PRIVATE_USERNAME')]) {
- wrap([$class: 'Xvfb']) {
- body.call()
+ def javaHome = tool name: env.JDK_VERSION, type: 'hudson.model.JDK'
+ withEnv(["JAVA_HOME=${javaHome}"]) {
+ withCredentials([string(credentialsId: 'ARTIFACTORY_PRIVATE_API_KEY', variable: 'ARTIFACTORY_API_KEY'),
+ usernamePassword(credentialsId: 'ARTIFACTORY_PRIVATE_USER', passwordVariable: 'ARTIFACTORY_PRIVATE_PASSWORD', usernameVariable: 'ARTIFACTORY_PRIVATE_USERNAME')]) {
+ wrap([$class: 'Xvfb']) {
+ body.call()
+ }
}
}
}
diff --git a/pom.xml b/pom.xml
index 11cdbf3..89cb26c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.sonarsource.parent</groupId>
<artifactId>parent</artifactId>
- <version>48</version>
+ <version>51</version>
</parent>
<groupId>org.sonarsource.css</groupId>
@@ -178,6 +178,20 @@
</dependencies>
</dependencyManagement>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <release>8</release>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
<profiles>
<profile>
<id>its</id>
diff --git a/travis.sh b/travis.sh
index 59cadca..fb5230c 100755
--- a/travis.sh
+++ b/travis.sh
@@ -4,12 +4,10 @@ set -euo pipefail
function configureTravis {
mkdir -p ~/.local
- curl -sSL https://github.com/SonarSource/travis-utils/tarball/v54 | tar zx --strip-components 1 -C ~/.local
+ curl -sSL https://github.com/SonarSource/travis-utils/tarball/v56 | tar zx --strip-components 1 -C ~/.local
source ~/.local/bin/install
}
configureTravis
-. installJDK8
-. ~/.local/bin/installMaven35
export DEPLOY_PULL_REQUEST=true