Skip to content

Commit

Permalink
Wrap element JS action with retrier (#93)
Browse files Browse the repository at this point in the history
* Wrap element JS action with retrier

* Update settings

* Update pom

* Update pipeline

* Update selenium core library

* Update maven step in pipeline
  • Loading branch information
paveliam authored May 8, 2020
1 parent caf08db commit 9fe7547
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 168 deletions.
40 changes: 32 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Maven

trigger:
- master

pool:
vmImage: 'windows-latest'

steps:
jobs:
- job: sonar
displayName: Analyse code with SonarQube

steps:
- task: SonarCloudPrepare@1
displayName: 'Prepare SonarCloud analysis'
inputs:
SonarCloud: 'SonarCloud'
organization: 'aqualityautomation'
Expand All @@ -16,11 +19,8 @@ steps:
extraProperties: |
sonar.coverage.exclusions=**/**
- task: ScreenResolutionUtility@1
inputs:
displaySettings: 'optimal'

- task: Maven@3
displayName: 'Build project'
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
Expand All @@ -29,10 +29,34 @@ steps:
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean test -Dprofile=local'
goals: 'clean'

- task: SonarCloudAnalyze@1
displayName: 'Run SonarCloud code analysis'
continueOnError: true

- task: SonarCloudPublish@1
displayName: 'Publish SonarCloud quality gate results'
inputs:
pollingTimeoutSec: '300'

- job: tests
displayName: Run tests

steps:
- task: ScreenResolutionUtility@1
displayName: 'Set optimal screen resolution'
inputs:
displaySettings: 'optimal'

- task: Maven@3
displayName: 'Run tests'
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'test -Dprofile=local'
267 changes: 116 additions & 151 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium</artifactId>
<version>2.1.0</version>
<packaging>jar</packaging>
<version>2.1.1</version>

<packaging>jar</packaging>
<name>Aquality Selenium</name>
<description>Library around Selenium WebDriver</description>
<url>https://github.com/aquality-automation/aquality-selenium-java</url>
Expand Down Expand Up @@ -74,7 +74,7 @@
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium-core</artifactId>
<version>LATEST</version>
<version>1.0.1</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -119,160 +119,125 @@
<version>1.7.26</version>
<scope>test</scope>
</dependency>

</dependencies>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
<destFile>${project.build.directory}/jacoco/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/jacoco/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco/jacoco-ut.exec</dataFile>
<outputDirectory>${project.build.directory}/coverage-report</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<argLine>${surefireArgLine} -Dfile.encoding=UTF-8</argLine>
<reuseForks>false</reuseForks>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/TestSuite.xml</suiteXmlFile>
</suiteXmlFiles>
<dataFile>${project.build.directory}/jacoco/jacoco-ut.exec</dataFile>
<outputDirectory>${project.build.directory}/coverage-report</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>attached</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>${surefireArgLine} -Dfile.encoding=UTF-8</argLine>
<reuseForks>false</reuseForks>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/TestSuite.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>attached</goal>
</goals>
<phase>package</phase>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>sonar</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.6.0.1398</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<properties>
<sonar.host.url>http://172.20.68.34:9000</sonar.host.url>
<sonar.login>a9d71a45706333578fa9d518a0aa82d89ecbe3ce</sonar.login>
<sonar.projectKey>sonar.selenium-web-java</sonar.projectKey>
<sonar.sources>src/main</sonar.sources>
<sonar.tests>src/test</sonar.tests>
<sonar.language>java</sonar.language>
<sonar.java.binaries>.</sonar.java.binaries>
<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
</properties>
</profile>
</profiles>

</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 9fe7547

Please sign in to comment.