-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
68 lines (68 loc) · 1.88 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
pipeline {
parameters {
string(
name: 'TEST_NS_SINGLE',
defaultValue: 'https://10.3.199.247:8443',
description: 'Single NS API address',
trim: true
)
string(
name: 'TEST_NS_HA_1',
defaultValue: '',
description: 'NS HA cluster - 1st node API address',
trim: true
)
string(
name: 'TEST_NS_HA_2',
defaultValue: '',
description: 'NS HA cluster - 2nd node API address',
trim: true
)
}
options {
disableConcurrentBuilds()
}
agent {
node {
label 'solutions-126'
}
}
stages {
stage('Tests [unit]') {
steps {
sh "make test-unit-container"
}
}
stage('Tests [e2e-ns-single]') {
when {
allOf {
expression { params.TEST_NS_SINGLE != '' }
expression { params.TEST_NS_SINGLE != null }
}
}
steps {
sh """
TEST_NS_SINGLE=${params.TEST_NS_SINGLE} \
make test-e2e-ns-single-container;
"""
}
}
stage('Tests [e2e-ns-cluster]') {
when {
allOf {
expression { params.TEST_NS_HA_1 != '' }
expression { params.TEST_NS_HA_1 != null }
expression { params.TEST_NS_HA_2 != '' }
expression { params.TEST_NS_HA_2 != null }
}
}
steps {
sh """
TEST_NS_HA_1=${params.TEST_NS_HA_1} \
TEST_NS_HA_2=${params.TEST_NS_HA_2} \
make test-e2e-ns-cluster-container;
"""
}
}
}
}