add raw state of with jenkins

This commit is contained in:
2025-02-24 14:07:22 +01:00
parent 69323be965
commit 9afa8808db
4 changed files with 49 additions and 4 deletions

34
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,34 @@
pipeline {
agent any
stages {
stage('Checkout Code & Submodules') {
steps {
git branch: 'main', url: 'git@github.com:your-org/my-main-repo.git', credentialsId: 'git-credentials'
sh 'git submodule update --init --recursive'
}
}
stage('Run Backend Pipeline') {
steps {
build job: 'backend-pipeline', wait: true
}
}
stage('Run Frontend Pipeline') {
steps {
build job: 'frontend-pipeline', wait: true
}
}
stage('Deploy Infrastructure') {
steps {
sshagent(['jenkins-ssh-key']) {
sh "ssh user@server 'cd /opt/myapp && git pull origin main && docker compose up -d'"
}
}
}
}
}