From aaf7c3b2f53f353fc8bf0ab096bde713834b275c Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 15 May 2025 11:56:26 -0400 Subject: [PATCH] deployment tweak --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dda0966..474013b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,6 +24,7 @@ pipeline { testcmd mktemp testcmd curl testcmd git + testcmd rsync testcmd sed testcmd ssh testcmd ssh-keyscan @@ -43,7 +44,7 @@ pipeline { } stage('Build') { steps { - dotnetBuild(outputDirectory: "./dist", project: "vassago.csproj") + dotnetBuild(outputDirectory: "dist", project: "vassago.csproj") archiveArtifacts artifacts: 'dist/*' } } @@ -59,7 +60,7 @@ pipeline { { sh """#!/bin/bash ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'rm -rf temp_deploy & mkdir -p temp_deploy' - scp -i \"${PK}\" -r dist/ ${linuxServiceAccount_USR}@${env.targetHost}:temp_deploy + rsync -i \"${PK}\" -a dist/ ${linuxServiceAccount_USR}@${env.targetHost}:temp_deploy """ } } @@ -107,7 +108,7 @@ pipeline { sh """#!/bin/bash ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'cp -r dist oldgood-\$(mktemp -u XXXX)' ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'mv dist/appsettings.json appsettings.json' - ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'rm -rf dist/ && shopt -s dotglob & mv temp_deploy/* dist/' + ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'rm -rf dist/ && shopt -s dotglob & mv temp_deploy dist' ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'rm -rf temp_deploy' ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'mv appsettings.json dist/appsettings.json' """