Repository navigation
Expand file tree
/
Copy pathimport-github.groovy
More file actions
87 lines (69 loc) · 2.16 KB
/
Copy pathimport-github.groovy
File metadata and controls
87 lines (69 loc) · 2.16 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import java.text.SimpleDateFormat
/*atp = library(
identifier: 'import-github@master',
retriever: modernSCM(
[
$class: 'GitSCMSource',
remote: 'https://github.com/unixshaman/import-github.git'
]
)
)*/
def globalParams = [:]
// evaluate('mySharedLibrary.groovy')
// globParams = defineStandParams("DEV")
def hhh = ''
pipeline {
parameters {
booleanParam(name: 'run', defaultValue: false, description: 'Подтверждение запуска сборки')
string(defaultValue: 'asdf', description: 'asfd asdf', name: 'asdf1', trim: true)
string(defaultValue: 'asdf', description: 'asfd asdf', name: 'asdf2', trim: true)
}
agent any
/*{
node {
label 'slave'
}
}*/
stages {
stage ('Init') {
steps {
script {
hhh = params.asdf1
def grvCode = httpRequest(ignoreSslErrors: true,
url: 'https://raw.githubusercontent.com/unixshaman/import-github/master/vars/defineStandParams.groovy',
outputFile: 'mySharedLibrary.groovy'
)
// evaluate(new File('/mnt/resource/jenkins_agent/workspace/TEST/import-github/mySharedLibrary.groovy'))
libs = load 'mySharedLibrary.groovy'
libs.sampleFunc()
globParams = libs.defineStandParams("DEV")
echo ("${globParams["blob_path"]}")
/*
if (hhh == 'asdf') {
def ggg = input(id: 'checkAsdf',
message: 'Неправильный параметр',
ok: 'Применить',
parameters: [
string(defaultValue: 'fdsa 1234', description: '', name: 'asdfNew', trim: true)
]
)
hhh = ggg
}
*/
}
}
}
stage('Build') {
when { expression { params.run } }
steps {
echo "qwe"
echo "${params.asdf1} ${params.asdf2}"
}
post {
success {
echo "success"
}
}
}
}
}