diff --git a/Jenkinsfile b/Jenkinsfile index 93629907..08d9bcdf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,19 +1,19 @@ -pipeline { +pipeline { agent any stages { stage('Deploy To Kubernetes') { steps { - withKubeCredentials(kubectlCredentials: [[caCertificate: '', clusterName: 'EKS-1', contextName: '', credentialsId: 'k8-token', namespace: 'webapps', serverUrl: 'https://9F39F577334FF23706994135261985F2.gr7.ap-south-1.eks.amazonaws.com']]) { + 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') { + stage('verify Deployment') { steps { - withKubeCredentials(kubectlCredentials: [[caCertificate: '', clusterName: 'EKS-1', contextName: '', credentialsId: 'k8-token', namespace: 'webapps', serverUrl: 'https://9F39F577334FF23706994135261985F2.gr7.ap-south-1.eks.amazonaws.com']]) { + 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" } }