forked from jaiswaladi246/Microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
22 lines (19 loc) · 915 Bytes
/
Jenkinsfile
File metadata and controls
22 lines (19 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pipeline {
agent any
stages {
stage('Deploy To Kubernetes') {
steps {
withKubeCredentials(kubectlCredentials: [[caCertificate: '', clusterName: 'EKS-1', contextName: '', credentialsId: 'k8-token', namespace: 'webapps', serverUrl: 'https://9947C5066B210310095832ADB53E5DE3.gr7.ap-south-1.eks.amazonaws.com']]) {
sh "kubectl apply -f deployment-service.yml"
}
}
}
stage('verify Deployment') {
steps {
withKubeCredentials(kubectlCredentials: [[caCertificate: '', clusterName: 'EKS-1', contextName: '', credentialsId: 'k8-token', namespace: 'webapps', serverUrl: 'https://9947C5066B210310095832ADB53E5DE3.gr7.ap-south-1.eks.amazonaws.com']]) {
sh "kubectl get svc -n webapps"
}
}
}
}
}