adding new credentials

This commit is contained in:
areeqakbr 2025-02-26 09:39:20 +07:00
parent c2d58d263a
commit 74dc9cbc62
1 changed files with 9 additions and 6 deletions

9
Jenkinsfile vendored
View File

@ -81,12 +81,15 @@ spec:
} }
} }
stage('testing network to kubernetes') stage('Testing Network to Kubernetes') {
{
steps { steps {
container('kubectl') { container('kubectl') {
withCredentials([string(credentialsId: 'a03aac83-cfb5-462c-af9e-c0904ea4be9b', variable: 'KUBE_TOKEN')]) {
sh ''' sh '''
ping -c 4 https://console.kube.winteraccess.id/api/endpoints/1/kubernetes kubectl --server=https://console.kube.winteraccess.id/api/endpoints/1/kubernetes \
--token=$KUBE_TOKEN \
--kubeconfig=/dev/null \
get nodes
''' '''
} }
} }