-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
53 lines (51 loc) · 1.32 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
pipeline {
agent any
environment {
GIT_REPO="https://github.com/paulovitorcl/Jenkins-and-Taurus.git"
GIT_BRANCH="main"
}
stages {
stage ("Git checkout"){
steps {
deleteDir()
git branch: "$GIT_BRANCH", url: "$GIT_REPO"
}
}
stage ("Build") {
// Run the build
steps {
script {
sh 'echo Build'
}
}
}
stage ("Push image to ECR") {
steps {
script {
sh 'echo Push'
}
}
}
stage ("Tests") {
when { expression { fileExists("${WORKSPACE}/performance_tests/example.yml") } }
steps {
script{
try {
sh "docker run --rm -v ${WORKSPACE}:/bzt-configs -v ${WORKSPACE}/reports:/tmp/artifacts blazemeter/taurus example.yml"
} finally {
junit 'reports/report.xml'
cleanWs()
}
}
}
}
stage ("Deploy") {
// Run the deploy
steps {
script {
sh 'echo Deploy'
}
}
}
}
}