Add checkout method
This commit is contained in:
parent
fc0865e82c
commit
ca4abd5284
16
vars/checkoutStep.groovy
Normal file
16
vars/checkoutStep.groovy
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
String call(Map config = [:]) {
|
||||
Map defaults = [
|
||||
dirtyFlag: '-dirty'
|
||||
]
|
||||
Map runConfig = defaults + config
|
||||
|
||||
checkout scm
|
||||
|
||||
GIT_TAG = sh(
|
||||
script: "git describe --tags --always --dirty=${runConfig.dirtyFlag}",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
return GIT_TAG
|
||||
}
|
||||
10
vars/packageStep.groovy
Normal file
10
vars/packageStep.groovy
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
void call(Map config = [:]) {
|
||||
Map defaults = [
|
||||
artifacts: []
|
||||
]
|
||||
Map runConfig = defaults + config
|
||||
|
||||
echo "${runConfig}"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user