A working Azure Pipelines for Java, Selenium, SauceLabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maven | |
# Build your Java project and run tests with Apache Maven. | |
# Add steps that analyze code, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/java | |
trigger: | |
- main | |
pr: | |
- main | |
pool: | |
vmImage: 'ubuntu-latest' | |
#Set the environment variables for the pipeline. | |
# We create a variable sauce_user and assign it a value of $(SAUCE_USERNAME), which comes from the ADO | |
variables: | |
- name: sauce_user | |
value: $(SAUCE_USERNAME) | |
- name: sauce_key | |
value: $(SAUCE_ACCESS_KEY) | |
steps: | |
- bash: echo $SAUCE_USER | |
- bash: echo $SAUCE_KEY | |
#This will build and run the tests in the Maven project | |
- task: Maven@3 | |
inputs: | |
mavenPomFile: 'pom.xml' | |
mavenOptions: '-Xmx3072m' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.8' | |
jdkArchitectureOption: 'x64' | |
publishJUnitResults: true | |
testResultsFiles: '**/surefire-reports/TEST-*.xml' | |
goals: 'package' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment