Updated withGiteaCreds
function
This commit is contained in:
parent
c662a25432
commit
5f7f1d25b4
@ -44,9 +44,22 @@ def withGiteaCreds(String credentialsId, String gitToolName, Closure body) {
|
|||||||
gitToolName: gitToolName
|
gitToolName: gitToolName
|
||||||
)
|
)
|
||||||
]) {
|
]) {
|
||||||
errorMessage = "Unable to set git config"
|
try {
|
||||||
sh "git config user.name ${env.GIT_USERNAME} || echo $errorMessage"
|
errorMessage = "Unable to set git config"
|
||||||
sh "git config user.email admin@dipal.ru || echo $errorMessage"
|
sh "git config user.name ${env.GIT_USERNAME} || echo $errorMessage"
|
||||||
|
sh "git config user.email admin@dipal.ru || echo $errorMessage"
|
||||||
|
} catch (error) {
|
||||||
|
sh "echo $error"
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
errorMessage = "Unable to set git config"
|
||||||
|
sh "git config --global user.name ${env.GIT_USERNAME} || echo $errorMessage"
|
||||||
|
sh "git config --global user.email admin@dipal.ru || echo $errorMessage"
|
||||||
|
} catch (error) {
|
||||||
|
sh "echo $error"
|
||||||
|
}
|
||||||
|
|
||||||
body()
|
body()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user