-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
32 lines (32 loc) · 1019 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pipeline {
agent any
stages {
stage('Clone') {
steps {
script {
sshagent(['1c4499aa-ab4c-47ad-86d7-65d364959d66']) {
sh "ssh jonathan@localhost 'cd /srv/quiz_backend/ && git pull https://github.com/jonathan-gatard/quiz_backend.git'"
}
}
}
}
stage('Build') {
steps {
script {
sshagent(['1c4499aa-ab4c-47ad-86d7-65d364959d66']) {
sh "ssh jonathan@localhost 'cd /srv/ && docker-compose build --no-cache quiz_backend'"
}
}
}
}
stage('Deploy') {
steps {
script {
sshagent(['1c4499aa-ab4c-47ad-86d7-65d364959d66']) {
sh "ssh jonathan@localhost 'cd /srv/ && docker-compose up -d quiz_backend'"
}
}
}
}
}
}