should deploy better
All checks were successful
gitea.arg.rip/vassago/pipeline/head This commit looks good

This commit is contained in:
adam 2025-04-29 14:50:11 -04:00
parent 059b2e657c
commit 0580a9d21f
2 changed files with 4 additions and 3 deletions

3
Jenkinsfile vendored
View File

@ -59,7 +59,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
scp -i \"${PK}\" -r dist/ ${linuxServiceAccount_USR}@${env.targetHost}:temp_deploy
"""
}
}
@ -105,6 +105,7 @@ pipeline {
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
{
sh """#!/bin/bash
ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'cp 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} 'mv appsettings.json dist/appsettings.json'

View File

@ -47,8 +47,8 @@
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Content Include="wwwroot/**/*">
<None Include="wwwroot/**/*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</None>
</ItemGroup>
</Project>