diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2020-03-04 10:53:12 +0100 |
---|---|---|
committer | Wouter Admiraal <45544358+wouter-admiraal-sonarsource@users.noreply.github.com> | 2020-03-05 11:53:22 +0100 |
commit | ae038e155d03502e1dcd154408f29a057f089456 (patch) | |
tree | 41d2282274a704e28ad96dbe937fbdfbbd333e16 /it/src | |
parent | 6da9b4b0c066d1e524a27aebc74cfd8d1b8ab19a (diff) | |
download | sonar-scanner-cli-ae038e155d03502e1dcd154408f29a057f089456.tar.gz sonar-scanner-cli-ae038e155d03502e1dcd154408f29a057f089456.zip |
BUILD-759 Move Jenkins + Travis QA to Cirrus CI
Diffstat (limited to 'it/src')
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java b/it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java index 086cba9..f03e757 100644 --- a/it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java +++ b/it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java @@ -68,13 +68,16 @@ public abstract class ScannerTestCase { if (StringUtils.isNotBlank(scannerVersion)) { LOG.info("Use provided Scanner version: " + scannerVersion); artifactVersion = Version.create(scannerVersion); + } else if (StringUtils.isNotBlank(System.getenv("PROJECT_VERSION"))) { + scannerVersion = System.getenv("PROJECT_VERSION"); + LOG.info("Use Scanner version from environment: " + scannerVersion); + artifactVersion = Version.create(scannerVersion); } else { try (FileInputStream fis = new FileInputStream( new File("../target/maven-archiver/pom.properties"))) { Properties props = new Properties(); props.load(fis); artifactVersion = Version.create(props.getProperty("version")); - return artifactVersion; } catch (IOException e) { throw new IllegalStateException(e); } |