-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathJenkinsfile
More file actions
23 lines (20 loc) · 944 Bytes
/
Jenkinsfile
File metadata and controls
23 lines (20 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pipeline {
agent any
stages {
stage('Deploy To Kubernetes') {
steps {
withKubeConfig(caCertificate: '', clusterName: 'EKS-1', contextName: '', credentialsId: 'k8-token', namespace: 'webapps', restrictKubeConfigAccess: false, serverUrl: 'https://680F9859A4E4B2EC6D8776ECD2DD1F4C.gr7.us-west-2.eks.amazonaws.com') {
sh "kubectl apply -f deployment-service.yml"
sleep 60
}
}
}
stage('verify Deployment') {
steps {
withKubeConfig(caCertificate: '', clusterName: 'EKS-1', contextName: '', credentialsId: 'k8-token', namespace: 'webapps', restrictKubeConfigAccess: false, serverUrl: 'https://680F9859A4E4B2EC6D8776ECD2DD1F4C.gr7.us-west-2.eks.amazonaws.com') {
sh "kubectl get svc -n webapps"
}
}
}
}
}