diff options
| author | Tibor Blenessy | 2019-04-18 15:08:26 +0200 | 
|---|---|---|
| committer | Elena Vilchik | 2019-04-23 09:25:30 +0200 | 
| commit | 048030385d611288b35efd0f9e861072cb40e018 (patch) | |
| tree | 8a21768016a537d140780a5e0fc0320e5fdc3f7d | |
| parent | 2b52cd9eed95dd99a6a51f99bebdf9f0364db19f (diff) | |
| download | sonar-css-048030385d611288b35efd0f9e861072cb40e018.tar.bz2 | |
Update CI build to use JDK 11
| -rw-r--r-- | .travis.yml | 4 | ||||
| -rw-r--r-- | Jenkinsfile | 38 | ||||
| -rw-r--r-- | pom.xml | 16 | ||||
| -rwxr-xr-x | travis.sh | 4 | 
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() +            }          }      }  } @@ -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> @@ -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 | 
