diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2023-10-10 16:12:58 +0200 |
---|---|---|
committer | Matteo Mara <98599122+matteo-mara-sonarsource@users.noreply.github.com> | 2023-10-12 14:14:34 +0200 |
commit | 5a8476b77a7a679d8adebdfe69fa4c9fda4a96ff (patch) | |
tree | 34d787921b2253a8bb4bd8f20c84dd7b39ca9b71 /it/pom.xml | |
parent | 9105fd9b2957d2a9e31341e4e9c6a3959977c036 (diff) | |
download | sonar-scanner-cli-5a8476b77a7a679d8adebdfe69fa4c9fda4a96ff.tar.gz sonar-scanner-cli-5a8476b77a7a679d8adebdfe69fa4c9fda4a96ff.zip |
SQSCANNER-121 Fix QA execution by using Cirrus provided build version
Diffstat (limited to 'it/pom.xml')
-rw-r--r-- | it/pom.xml | 40 |
1 files changed, 6 insertions, 34 deletions
@@ -74,7 +74,7 @@ <artifactId>maven-surefire-plugin</artifactId> <configuration> <systemProperties> - <scanner.version>${scanner.version}</scanner.version> + <scanner.version>${env.PROJECT_VERSION}</scanner.version> </systemProperties> <includes> <include>**/SonarScannerTestSuite.java</include> @@ -90,40 +90,12 @@ <id>download-qa-artifacts</id> <activation> <property> - <name>env.CI_BUILD_NUMBER</name> + <name>env.PROJECT_VERSION</name> </property> </activation> <build> <plugins> <plugin> - <groupId>org.codehaus.gmaven</groupId> - <artifactId>groovy-maven-plugin</artifactId> - <version>2.0</version> - <executions> - <execution> - <id>compute-qa-version</id> - <phase>initialize</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <source><![CDATA[ - String pom = new File(project.basedir, '../pom.xml').getText('UTF-8') - def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/ - assert matcher.matches() - def versionNoSnapshot = matcher[0][1] - if (new StringTokenizer(versionNoSnapshot, ".").countTokens() == 2) { - versionNoSnapshot += '.0' - } - project.properties['scanner.version'] = versionNoSnapshot + '.' + System.getenv()['CI_BUILD_NUMBER'] - ]]> - </source> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>3.0.2</version> @@ -135,7 +107,7 @@ <goal>get</goal> </goals> <configuration> - <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip</artifact> + <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip</artifact> </configuration> </execution> <execution> @@ -145,7 +117,7 @@ <goal>get</goal> </goals> <configuration> - <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:linux</artifact> + <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:linux</artifact> </configuration> </execution> <execution> @@ -155,7 +127,7 @@ <goal>get</goal> </goals> <configuration> - <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:windows</artifact> + <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:windows</artifact> </configuration> </execution> <execution> @@ -165,7 +137,7 @@ <goal>get</goal> </goals> <configuration> - <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:macosx</artifact> + <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${env.PROJECT_VERSION}:zip:macosx</artifact> </configuration> </execution> </executions> |