Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- to be able to docker push, a credentials is needed to be pre-stored in the jenkins container. - I created a set of credentials (for docker hub) in Jenkins in the credentials module. - this output a credentials.xml in JENKINS_HOME, which I then extracted. - I am pushing this credentials XML into JENKINS_HOME while building the Jenkins image - However, it seems the same encoding is not used everytime so the credentials.xml is not valid across Jenkins installations. - i.e pulling this from one running Jenkins instance, then pushing it into a different instance does not seem to work. As a result, docker push does not work unless you manually edit the credentials through UI before docker-pushing . Notes: - have tried using jenkins-cli. Could not figure out (despite trying for hours) how to use create-credentials-by-xml. - have tried using the docker remote API call as well (curl -X POST /images/name/push). Encountering weird login issue.
- Loading branch information