JR
Size: a a a
JR
ON
JR
ON
ON
ON
JR
JR
HC
JR
ON
JR
ON
JR
JR
ON
RT
Warning: A secret was passed to "sh" using Groovy String interpolation, which is insecure.
Affected argument(s) used the following variable(s): [PASSWORD]
See https://jenkins.io/redirect/groovy-string-interpolation for details.
stage("Check cluster") {
steps {
script {
// Jenkins plugin: https://plugins.jenkins.io/kubernetes-cli/
withKubeConfig([credentialsId: 'kube-config']) {
// Jenkins plugin: https://plugins.jenkins.io/credentials-binding/
withCredentials([usernamePassword(credentialsId: 'deployer',
usernameVariable: 'USERNAME',
passwordVariable: 'PASSWORD')]) {
sh ('oc login -u $USERNAME -p $PASSWORD --insecure-skip-tls-verify=true "https://api.lab.cluster.local:6443"')
sh """
oc project ${namespace}
oc get pods
"""
}
}
}
}
}
sh ('oc login -u $USERNAME' + ' -p $PASSWORD --insecure-skip-tls-verify=true "https://api.lab.cluster.local:6443"')
sh ("oc login -u ${env.USERNAME} -p ${env.PASSWORD} --insecure-skip-tls-verify=true https://api.lab.cluster.local:6443")
r
RT
DS