From c2575e696a6781cc681a99b9eebfec6f3591c416 Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 17 Nov 2024 23:25:14 -0500 Subject: [PATCH] see this is the bad thing - i get distracted mid Thing so i have no idea what this is. but it's pending. --- scripts/1clickservice.groovy | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) 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 + """ } } }