diff --git a/scripts/1clickservice.groovy b/scripts/1clickservice.groovy index a34b057..6bce333 100644 --- a/scripts/1clickservice.groovy +++ b/scripts/1clickservice.groovy @@ -67,19 +67,26 @@ pipeline { "webhooks": true }' """ + //TODO: set up credentials for jenkins to checkout + sshagent(['credentiald-id-using-ssh-key']) { + sh """ + git clone 'ssh://git@gitea.arg.rip:8022/greyn/${servicename}.git' + pushd ${servicename} + """ + } if(!params.database){ - //TODO: set up credentials for jenkins to checkout - sshagent(['credentiald-id-using-ssh-key']) - { - sh """ - git clone 'ssh://git@gitea.arg.rip:8022/greyn/${servicename}.git' - pushd ${servicename} - #//TODO: strip database stuff. sed -i? - git add . - git commit -m "stripped database stuff" - git push - """ - } + sh """ + #//TODO: strip database stuff. sed -i? + git add . + git commit -m "stripped database stuff" + """ + } + + sshagent(['credentiald-id-using-ssh-key']) { + sh """ + git push + popd + """ } } }