diff --git a/.gitea/template b/.gitea/template index 901b7e5..b327d28 100644 --- a/.gitea/template +++ b/.gitea/template @@ -7,6 +7,7 @@ Components/Layout/NavMenu.razor Configuration.cs devuitls.sh greynsvcDBContext.cs +Jenkinsfile Migrations/20241213175020_greets.cs Migrations/20241213175020_greets.Designer.cs Migrations/greynsvcDBContextModelSnapshot.cs diff --git a/Jenkinsfile b/Jenkinsfile index bff5f9d..b10b389 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,8 +32,8 @@ pipeline { withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')]) { 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 + 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 """ } } @@ -47,7 +47,7 @@ pipeline { withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')]) { sh """#!/bin/bash - ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'systemctl --user stop $REPO_NAME' + ssh -i \"$${PK}\" -tt $${linuxServiceAccount_USR}@$${targetHost} 'systemctl --user stop $$REPO_NAME' """ } } @@ -64,7 +64,7 @@ pipeline { sh """#!/bin/bash pushd dist - dotnet ef database update --connection "${env.productiondatabase_connectionString}" + dotnet ef database update --connection "$${env.productiondatabase_connectionString}" popd """ //TODO: if updating the db fails, restore the old one @@ -81,7 +81,7 @@ pipeline { withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')]) { sh """#!/bin/bash - ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'rm -rf dist/ && mv temp_deploy/ dist/' + ssh -i \"$${PK}\" -tt $${linuxServiceAccount_USR}@$${targetHost} 'rm -rf dist/ && mv temp_deploy/ dist/' """ } } @@ -95,7 +95,7 @@ pipeline { withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')]) { sh """#!/bin/bash - ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'systemctl --user start $REPO_NAME' + ssh -i \"$${PK}\" -tt $${linuxServiceAccount_USR}@$${targetHost} 'systemctl --user start $$REPO_NAME' """ } }