diff --git a/Jenkinsfile b/Jenkinsfile index 818e3a4..0ba2e3b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,36 +81,10 @@ spec: } } - stage('Testing Network to Kubernetes') { - steps { - container('kubectl') { - withCredentials([string(credentialsId: 'a03aac83-cfb5-462c-af9e-c0904ea4be9b', variable: 'KUBE_TOKEN')]) { - sh ''' - kubectl --server=https://console.kube.winteraccess.id/api/endpoints/1/kubernetes \ - --token=$KUBE_TOKEN \ - --kubeconfig=/dev/null \ - get nodes - ''' - } - } - } - } - - stage('Debug Kubernetes') { - steps { - container('kubectl') { - sh ''' - kubectl get pods --all-namespaces - ''' - } - } - } - - stage('Deploy to Kubernetes') { - steps { - container('kubectl') { // ✅ Ensures `kubectl` runs in the correct container - withKubeConfig([credentialsId: "${KUBE_CONFIG_ID}"]) { + steps { + container('kubectl') { // ✅ Runs kubectl inside the correct container + withKubeConfig([credentialsId: '1c8bd8d9-1590-468c-afc7-24495d4330dc']) { // ✅ Uses the Jenkins credential sh ''' set -e kubectl apply -f deploy/kubernetes/ --validate=true @@ -119,6 +93,8 @@ spec: } } } + + } post {