-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
28 lines (28 loc) · 895 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
node {
def app
stage('Checkout') {
git credentials: 'github', url: 'https://github.com/Onbehalfofme/automatic-check-attendance.git', branch: 'master'
}
stage('Backend image build') {
backend = docker.build("onbehalfofme/attendance", "./backend")
}
stage('Push backend image'){
docker.withRegistry('https://registry.hub.docker.com', 'dockerhub') {
backend.push("backend")
}
}
/* stage('Frontend image build') {
frontend = docker.build("onbehalfofme/attendance", "./frontend")
}
stage('Push frontend image'){
docker.withRegistry('https://registry.hub.docker.com', 'dockerhub') {
frontend.push("frontend")
}
}*/
stage('Remove local images') {
sh 'docker image prune -a -f'
}
stage('Deploy'){
sh 'ssh [email protected] "./deploy.sh"'
}
}