-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
86 lines (75 loc) · 2.55 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
trigger:
branches:
include:
- master
schedules:
- cron: "10 12 * * *"
displayName: Daily Load Test
always: true
branches:
include:
- master
stages:
- stage: build
displayName: Build
jobs:
- job: build
displayName: Build
pool:
name: Diar
steps:
- script: |
mvn clean package -DartifactVersion=$(Build.BuildNumber)
displayName: 'Build with Maven'
variables:
artifactVersion: $(Build.BuildNumber)
- stage: test
displayName: Test
jobs:
- job: test
displayName: Test
pool:
name: Diar
steps:
- script: |
mvn test -DartifactVersion=$(Build.BuildNumber)
displayName: 'Run Maven Tests'
- stage: deploy
displayName: Deploy
jobs:
- job: nexus_deploy
displayName: Nexus Deploy
pool:
name: Diar
steps:
- task: Maven@4
inputs:
mavenPomFile: 'pom.xml'
publishJUnitResults: true
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
sonarQubeRunAnalysis: false
- script: |
mvn deploy -Dmaven.deploy.skip=true -DartifactVersion=$(Build.BuildNumber)
mvn deploy:deploy-file -Durl=http://localhost:8081/repository/maven-releases/ -DrepositoryId=maven-releases -Dfile=$(Build.SourcesDirectory)/warfiles/petclinic.war -DgroupId=org.springframework.samples -DartifactId=spring-framework-petclinic -Dversion=$(Build.BuildNumber) -Dpackaging=war -DgeneratePom=false -DuniqueVersion=false
displayName: 'Deploy to Nexus'
- script: |
/home/diarhussein/Downloads/apache-jmeter-5.6.2/bin/jmeter -n -t /home/diarhussein/Downloads/devoteam-traineeship-petclinic/src/test/jmeter/JMetertest.jmx
displayName: 'Run JMeter Tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
mergeTestResults: true
testRunTitle: 'JMeter Load test'
- stage: RunSeleniumTests
displayName: Run Selenium Tests
jobs:
- job: RunSeleniumTestsJob
pool:
name: Diar
steps:
- script: pip install selenium
- script: python /home/diarhussein/Downloads/devoteam-traineeship-petclinic/test_petclinic.py