fireant-bot / fireant

Fireant is a Dependabot-like service (tailored to Apache Ant + Ivy projects) which creates pull requests to keep your dependencies secure and up-to-date.
https://github.com/fireant-bot/fireant
Apache License 2.0
1 stars 1 forks source link

Dockerhub credential in pipeline #25

Closed mjemnawaz closed 3 years ago

mjemnawaz commented 3 years ago

Add or explain how to add a username/password credential for dockerhub on a jenkins instance so that the jenkins pipeline will execute successfully.

lewismc commented 3 years ago

@mjemnawaz please document the above ticket otherwise no-one knows what this means. Thank you

lewismc commented 3 years ago

Hi @mjemnawaz you can see that I restructured the credential identifier, namely USE_UPPER_CASE_AND_SEPARATE_WITH_UNDERSCORES. We then reference it as follows.

lewismc commented 3 years ago

You can see it being used in the most recent build https://ci-builds.apache.org/job/Nutch/job/nutch-fireant/10/console The build fails as follows

Using the existing docker config file.Removing blacklisted property: auths$ docker login -u fireant-dockerhub-id -p **** https://index.docker.io/v1/ WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

Please check the credentials you sent me and resend. Thank you

lewismc commented 3 years ago

We are still getting the former

Using the existing docker config file.Removing blacklisted property: auths$ docker login -u fireantbot -p ******** https://index.docker.io/v1/

WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/jenkins/workspace/Nutch/nutch-fireant@tmp/5b1d081e-d499-45ae-9d82-73c2812bbfc8/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

@mjemnawaz can you please take a look and let me know if you can come to any solution?

lewismc commented 3 years ago

https://ci-builds.apache.org/job/Nutch/job/nutch-fireant/11/console

lewismc commented 3 years ago

OK the pipeline is successful https://hub.docker.com/r/fireantbot/fireant