Ulises Magana
May 20, 2023

I faced similar issues when doing this project.

Did you make sure that the Docker Hub environment variables saved in Jenkins are exactly the same as in the Jenkinsfile?

I mean, they should be the same as in the Deploy stage -->

withCredentials([usernamePassword(credentialsId: "${DOCKER_REGISTRY_CREDS}

DOCKER_REGISTRY_CREDS is the environment variable that you should've saved in Jenkins. In case you chose another name for the environment variable, modify the deploy stage in the Jenkinsfile according to the name of the env var that you saved.

Ulises Magana
Ulises Magana

Written by Ulises Magana

Cloud & Infrastructure Engineer with diverse experience in software development, database administration, SRE & DevOps.

Responses (1)