From 017fe44d8e70c5c1f9ec5f4334e407c8a9865e24 Mon Sep 17 00:00:00 2001 From: "d.bogatko" Date: Fri, 13 Sep 2019 10:44:46 +0300 Subject: [PATCH 1/6] updated azure pipeline.yml (added sonarcloud tasks) and sonar-project.properties (added project key) --- azure-pipelines.yml | 42 ++++++++++++------- ...oud.properties => sonar-project.properties | 3 +- 2 files changed, 30 insertions(+), 15 deletions(-) rename .sonarcloud.properties => sonar-project.properties (50%) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 121e6c2..0607c10 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,22 +1,36 @@ # Maven trigger: -- master + - master pool: vmImage: 'windows-latest' steps: -- task: ScreenResolutionUtility@1 - inputs: - displaySettings: 'optimal' -- task: Maven@3 - inputs: - mavenPomFile: 'pom.xml' - mavenOptions: '-Xmx3072m' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.8' - jdkArchitectureOption: 'x64' - publishJUnitResults: true - testResultsFiles: '**/surefire-reports/TEST-*.xml' - goals: 'clean test -DdriverSettings.chrome.webDriverVersion=75.0.3770.140 -Dprofile=local' + - task: SonarCloudPrepare@1 + inputs: + SonarCloud: 'SonarCloud' + organization: 'aqualityautomation' + scannerMode: 'CLI' + configMode: 'file' + + - task: SonarCloudAnalyze@1 + + - task: SonarCloudPublish@1 + inputs: + pollingTimeoutSec: '300' + + - task: ScreenResolutionUtility@1 + inputs: + displaySettings: 'optimal' + + - task: Maven@3 + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'clean test -DdriverSettings.chrome.webDriverVersion=75.0.3770.140 -Dprofile=local' diff --git a/.sonarcloud.properties b/sonar-project.properties similarity index 50% rename from .sonarcloud.properties rename to sonar-project.properties index 3a068ba..80b50aa 100644 --- a/.sonarcloud.properties +++ b/sonar-project.properties @@ -2,4 +2,5 @@ sonar.sources=src/main sonar.tests=src/test sonar.language=java sonar.java.binaries=. -sonar.sourceEncoding=UTF-8 \ No newline at end of file +sonar.sourceEncoding=UTF-8 +sonar.projectKey=aquality-automation_aquality-selenium-java \ No newline at end of file From 1a431d7f642ae566703127680789cbd1b9bcb03a Mon Sep 17 00:00:00 2001 From: "d.bogatko" Date: Fri, 20 Sep 2019 19:01:33 +0300 Subject: [PATCH 2/6] updated sonarcloud properties file --- sonar-project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 80b50aa..39d4668 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,5 @@ -sonar.sources=src/main -sonar.tests=src/test +sonar.sources=/src/main +sonar.tests=/src/test sonar.language=java sonar.java.binaries=. sonar.sourceEncoding=UTF-8 From c5747bb9aa5ccdef771f5141b844e2d194e072d0 Mon Sep 17 00:00:00 2001 From: "d.bogatko" Date: Fri, 20 Sep 2019 19:08:48 +0300 Subject: [PATCH 3/6] updated sonarcloud properties file --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 39d4668..b607a86 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,5 @@ sonar.sources=/src/main -sonar.tests=/src/test +sonar.tests=src/test sonar.language=java sonar.java.binaries=. sonar.sourceEncoding=UTF-8 From 819416dff45bc949eb22402e1599239ca8001309 Mon Sep 17 00:00:00 2001 From: "d.bogatko" Date: Fri, 20 Sep 2019 19:11:18 +0300 Subject: [PATCH 4/6] changed order of steps in pipeline --- azure-pipelines.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0607c10..2ba88dd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,23 +14,23 @@ steps: scannerMode: 'CLI' configMode: 'file' - - task: SonarCloudAnalyze@1 - - - task: SonarCloudPublish@1 - inputs: - pollingTimeoutSec: '300' - - task: ScreenResolutionUtility@1 inputs: displaySettings: 'optimal' - task: Maven@3 + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'clean test -DdriverSettings.chrome.webDriverVersion=75.0.3770.140 -Dprofile=local' + + - task: SonarCloudAnalyze@1 + + - task: SonarCloudPublish@1 inputs: - mavenPomFile: 'pom.xml' - mavenOptions: '-Xmx3072m' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.8' - jdkArchitectureOption: 'x64' - publishJUnitResults: true - testResultsFiles: '**/surefire-reports/TEST-*.xml' - goals: 'clean test -DdriverSettings.chrome.webDriverVersion=75.0.3770.140 -Dprofile=local' + pollingTimeoutSec: '300' From 9a6a83e6091e67be82b570816b5ea70cc202b60a Mon Sep 17 00:00:00 2001 From: "d.bogatko" Date: Fri, 20 Sep 2019 19:12:07 +0300 Subject: [PATCH 5/6] changed order of steps in pipeline --- azure-pipelines.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2ba88dd..1e7025e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,15 +19,15 @@ steps: displaySettings: 'optimal' - task: Maven@3 - inputs: - mavenPomFile: 'pom.xml' - mavenOptions: '-Xmx3072m' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.8' - jdkArchitectureOption: 'x64' - publishJUnitResults: true - testResultsFiles: '**/surefire-reports/TEST-*.xml' - goals: 'clean test -DdriverSettings.chrome.webDriverVersion=75.0.3770.140 -Dprofile=local' + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'clean test -DdriverSettings.chrome.webDriverVersion=75.0.3770.140 -Dprofile=local' - task: SonarCloudAnalyze@1 From ae0bee534dcf9c100ff2ebcbe915e3586605a72a Mon Sep 17 00:00:00 2001 From: "d.bogatko" Date: Fri, 20 Sep 2019 19:20:55 +0300 Subject: [PATCH 6/6] changed order of steps in pipeline --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index b607a86..80b50aa 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,4 @@ -sonar.sources=/src/main +sonar.sources=src/main sonar.tests=src/test sonar.language=java sonar.java.binaries=.