From ffecf2611dd14f54ce153a3f7522d1cc7a8a6007 Mon Sep 17 00:00:00 2001 From: crusader Date: Sat, 4 Feb 2023 08:12:01 +0000 Subject: [PATCH] environment test --- Jenkinsfile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b7b76e0..667a8a1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -95,16 +95,20 @@ podTemplate( stage('Deploy Application on K8s') { container('kubectl') { - withKubeCredentials(kubectlCredentials: [[ - caCertificate: '', - clusterName: 'microk8s', - contextName: '', - credentialsId: 'jenkins-admin-secret', - namespace: 'kube-system', - serverUrl: 'https://192.168.50.10:16443']]) { + withKubeConfig([credentialsId: 'loafle_net-kubeconfig']) { + sh 'kubectl get pods -n dev' + } + + // withKubeConfig(kubectlCredentials: [[ + // caCertificate: '', + // clusterName: 'microk8s', + // contextName: '', + // credentialsId: 'loafle_net-kubeconfig', + // namespace: 'kube-system', + // serverUrl: 'https://192.168.50.10:16443']]) { - sh "kubectl config view" - } + // sh "kubectl config view" + // } } }