-
Notifications
You must be signed in to change notification settings - Fork 5
/
jenkinsfile
60 lines (55 loc) · 2.22 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
def connectionString
def versionText
def versionValue
def configText
def configVer
pipeline {
agent none
environment {
dev_storage_cred = credentials("${env.dev_storage_cred}")
upd_storage_cred = credentials("${env.upd_storage_cred}")
prd_storage_cred = credentials("${env.prd_storage_cred}")
prd_ib_cred = credentials("${env.prd_ib_cred}")
}
stages {
stage('Изменение версии системы') {
agent { label "${env.dev_agent_label}"}
steps {
timestamps {
cmd("yadt incver -storage-path \"${env.dev_storage_path}\" -storage-user ${dev_storage_cred_Usr} -storage-pwd ${dev_storage_cred_Psw} -ver-tmplt ${env.ver_tmplt} -ver-mask ${env.ver_mask} -ver-comment \"${env.ver_comment}\"")
}
}
}
stage('Выгрузка конфигурации для обновления') {
agent { label "${env.dev_agent_label}"}
steps {
timestamps {
cmd("yadt makecf -storage-path \"${env.dev_storage_path}\" -storage-user ${dev_storage_cred_Usr} -storage-pwd ${dev_storage_cred_Psw} -cf-path \"${env.dev_cf_path}\"");
}
}
}
stage('Обновление рабочего хранилища') {
agent { label "${env.upd_agent_label}"}
steps {
timestamps {
cmd("yadt updstorage -storage-path \"${env.prd_storage_path}\" -storage-user ${upd_storage_cred_Usr} -storage-pwd ${upd_storage_cred_Psw} -ib-path \"${env.upd_ib_path}\" -cf-path \"${env.upd_cf_path}\" -delcf");
}
}
}
stage('Обновление рабочей базы') {
agent { label "${env.prd_agent_label}"}
steps {
timestamps {
cmd("yadt updib -ib-path \"${env.prd_ib_path}\" -ib-user ${prd_ib_cred_Usr} -ib-pwd ${prd_ib_cred_Psw} -storage-path \"${env.prd_storage_path}\" -storage-user ${prd_storage_cred_Usr} -storage-pwd ${prd_storage_cred_Psw}");
}
}
}
}
}
def cmd(command) {
if (isUnix()) {
sh "${command}"
} else {
bat "chcp 65001\n${command}"
}
}