-
Notifications
You must be signed in to change notification settings - Fork 57
/
Jenkinsfile
60 lines (46 loc) · 1.3 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
pipeline {
agent none
options {
buildDiscarder(logRotator(numToKeepStr: '7'))
skipDefaultCheckout()
}
stages {
stage('Тестирование кода пакета WIN') {
agent { label 'windows' }
steps {
checkout scm
script {
bat 'chcp 65001 > nul && opm install -l'
if( fileExists ('tasks/test.os') ){
try {
cmd("oscript tasks/test.os")
junit 'tests.xml'
} catch (Exception err) {
junit 'tests.xml'
//throw err;
}
}
else
echo 'no testing task'
def scannerHome = tool 'sonar-scanner';
withSonarQubeEnv('silverbulleters') {
sh "${scannerHome}/bin/sonar-scanner"
}
}
}
}
stage('Тестирование кода пакета LINUX') {
agent { label 'master' }
steps {
echo 'under development'
}
}
}
}
def cmd(command) {
if (isUnix()) {
sh "${command}"
} else {
bat "chcp 65001\n${command}"
}
}