i take it back, it does need to be
Some checks failed
gitea.arg.rip/_template-service/pipeline/head There was a failure building this commit

This commit is contained in:
adam 2024-12-13 18:58:33 -05:00
parent f0287a0014
commit 8e1fcef0a7
2 changed files with 7 additions and 6 deletions

View File

@ -7,6 +7,7 @@ Components/Layout/NavMenu.razor
Configuration.cs Configuration.cs
devuitls.sh devuitls.sh
greynsvcDBContext.cs greynsvcDBContext.cs
Jenkinsfile
Migrations/20241213175020_greets.cs Migrations/20241213175020_greets.cs
Migrations/20241213175020_greets.Designer.cs Migrations/20241213175020_greets.Designer.cs
Migrations/greynsvcDBContextModelSnapshot.cs Migrations/greynsvcDBContextModelSnapshot.cs

12
Jenkinsfile vendored
View File

@ -32,8 +32,8 @@ pipeline {
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')]) withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
{ {
sh """#!/bin/bash sh """#!/bin/bash
ssh -i \"${PK}\" -tt ${linuxServiceAccount_USR}@${targetHost} 'rm -rf temp_deploy & mkdir -p 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 scp -i \"$${PK}\" -r dist $${linuxServiceAccount_USR}@$${env.targetHost}:temp_deploy
""" """
} }
} }
@ -47,7 +47,7 @@ pipeline {
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')]) withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
{ {
sh """#!/bin/bash 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 sh """#!/bin/bash
pushd dist pushd dist
dotnet ef database update --connection "${env.productiondatabase_connectionString}" dotnet ef database update --connection "$${env.productiondatabase_connectionString}"
popd popd
""" """
//TODO: if updating the db fails, restore the old one //TODO: if updating the db fails, restore the old one
@ -81,7 +81,7 @@ pipeline {
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')]) withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
{ {
sh """#!/bin/bash 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')]) withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
{ {
sh """#!/bin/bash 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'
""" """
} }
} }