-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
61 lines (61 loc) · 1.61 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
pipeline {
agent {
node {
label 'pl-pxe-jenkins-1.pl.plumewifi.com||pl-pxe-jenkins-2.pl.plumewifi.com'
}
}
options { timestamps () }
environment {
PR_CHECK = 'true'
}
stages {
stage('setup') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[
$class: 'SubmoduleOption',
disableSubmodules: false,
parentCredentials: true,
recursiveSubmodules: true,
reference: '',
trackingSubmodules: true
]
],
submoduleCfg: [],
userRemoteConfigs: [
[
credentialsId: 'jenkins-pytest',
url: '[email protected]:plume-design/autotest-testrunner.git'
]
]
])
script {
sshagent (credentials: ['jenkins-pytest']) {
sh 'python3 lib/util/jenkins_setup.py --GIT_URL=${GIT_URL} --BRANCH_NAME=${BRANCH_NAME} --GIT_COMMIT=${GIT_COMMIT} --CHANGE_ID=${CHANGE_ID}'
}
}
}
}
stage('run unit_test') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE'){
sh './docker/dock-run pytest -n 3 --junitxml=./unit_test_report.xml -m tag_qa_lib_testbed ./tests/unit_tests'
}
}
}
stage('create customer env osrt') {
steps {
sh './docker/dock-run python ./lib/util/customer_env/customer.py osrt'
}
}
}
post {
always {
allure([[path: 'allure-results']])
}
}
}