forked from GMCADevops/Sfia-DevOps-Project-3
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
39 lines (37 loc) · 1.1 KB
/
Copy pathJenkinsfile
File metadata and controls
39 lines (37 loc) · 1.1 KB
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
33
34
35
36
37
38
39
pipeline {
agent any
stages{
stage('Testing'){
steps{
sh 'chmod +x jenkins/testing.sh'
sh './jenkins/testing.sh'
}
}
stage("Build Images"){
steps{
sh 'chmod +x jenkins/build.sh'
sh './jenkins/build.sh'
}
}
stage('Push'){
steps{
script{
docker.withRegistry('', 'docker-hub-credentials'){
sh '''
cd app
docker-compose push
docker system prune -af
'''
}
}
}
}
stage("Deployment"){
steps{
sh 'aws eks --region eu-west-2 update-kubeconfig --name my-cluster'
sh 'chmod +x jenkins/deployment.sh'
sh './jenkins/deployment.sh'
}
}
}
}