-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJenkinsfile
34 lines (30 loc) · 903 Bytes
/
Jenkinsfile
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
pipeline{
agent any
options{
buildDiscarder(logRotator(numToKeepStr: '8'))
}
stages{
stage ('Clone project'){
steps{
script{
currentBuild.displayName = "#${BUILD_NUMBER} [${GIT_BRANCH}]"
}
cleanWs()
checkout scm
}
}
stage ('Set up environment and run tests'){
steps{
sh "docker-compose -f docker-compose-v3.yml up --scale chrome=2 --scale firefox=2 --scale edge=2 --exit-code-from selenium-tests"
}
}
}
post{
always{
sh "docker-compose down"
step([$class: 'Publisher', reportFilenamePattern: '**/testng-results.xml'])
//delete image created for application under test "sh docker image rm my/app"
sh "docker image rm selenium/tests"
}
}
}