adding docker login
This commit is contained in:
parent
eb5315a3fa
commit
e77efc5297
|
|
@ -45,6 +45,16 @@ spec:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Login to Docker Registry') {
|
||||||
|
steps {
|
||||||
|
container('docker') {
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'DOCKERUSRPASS', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
|
||||||
|
sh "docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} ${REGISTRY_URL}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Build and Push Docker Image') {
|
stage('Build and Push Docker Image') {
|
||||||
steps {
|
steps {
|
||||||
container('docker') { // Runs in the Docker container inside Kubernetes
|
container('docker') { // Runs in the Docker container inside Kubernetes
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue