-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
63 lines (61 loc) · 1.9 KB
/
Jenkinsfile
File metadata and controls
63 lines (61 loc) · 1.9 KB
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
pipeline {
options { disableConcurrentBuilds() }
agent { label 'dss-plugin-tests'}
environment {
PLUGIN_INTEGRATION_TEST_INSTANCE="/home/jenkins-agent/instance_config.json"
}
stages {
stage('Run Unit Tests') {
steps {
sh 'echo "Running unit tests"'
catchError(stageResult: 'FAILURE') {
sh """
make unit-tests
"""
}
sh 'echo "Done with unit tests"'
}
}
stage('Run Integration Tests') {
steps {
sh 'echo "Running integration tests"'
catchError(stageResult: 'FAILURE') {
sh """
make integration-tests
"""
}
sh 'echo "Done with integration tests"'
}
}
}
post {
always {
script {
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: 'tests/allure_report']]
])
def colorCode = '#FF0000'
def status = currentBuild.currentResult
if (status == 'SUCCESS')
{
colorCode = '#00FF00'
}
if (status == 'UNSTABLE')
{
colorCode = '#FFC300'
}
def subject = "*Plugin* : ${env.JOB_NAME}"
def job_info = "*Build number* : ${env.BUILD_NUMBER}"
def status_info = "*Status* : ${status}"
def build_url = "*Build* : ${env.BUILD_URL}"
def allure_report = "*Report* : ${env.BUILD_URL}/allure"
def summary = "${subject}\n${status_info}\n\n${job_info}\n${build_url}\n${allure_report}"
slackSend(color: colorCode, message: summary, notifyCommitters: true)
}
}
}
}