-
Notifications
You must be signed in to change notification settings - Fork 13
/
jenkinsfile
48 lines (47 loc) · 963 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
pipeline {
agent any
parameters {
string defaultValue: '', description: 'select a browser', name: 'browser', trim: false
}
tools
{
maven 'maven_home'
}
stages
{
stage('checkout')
{
steps{
echo "checkingout"
echo "${params.browser}"
git credentialsId: '140b9004-3666-4252-a40e-f876c2bad208', url: 'https://github.com/qavbox/SampleProjSel.git'
}
}
stage('Test')
{
steps
{
catchError {
echo "Test"
sh "mvn test -Dbrowser=${params.browser} -Dmaven.test.failure.ignore=true"
}
echo currentBuild.result
}
}
stage('Deploy')
{
steps
{
echo "Deploy"
}
}
}
post{
always{
echo "artifact"
archiveArtifacts artifacts: 'ExtentTestReport/*.html'
archiveArtifacts artifacts: 'target/surefire-reports/emailable-report.html'
junit testResults: 'target/surefire-reports/*.xml', skipPublishingChecks: true
}
}
}