Jenkins with harbor #14487
Replies: 6 comments
-
I am able to push docker images to public repo I need to push to harbor any suggestions pls? |
Beta Was this translation helpful? Give feedback.
-
just push to your harbor instance:
|
Beta Was this translation helpful? Give feedback.
-
Something like this should work: // replace "example:tag" with your image repo and tag
// replace "harbor.example.com" with the hostname of your harbor instance
// replace "project" with the name of the project to push to your harbor
sh 'docker tag example:tag harbor.example.com/project/example:tag'
// replace 'harbor-credentials' with a credential in jenkins containing a username and password
// that are authorised to push images to the desired project
docker.withRegistry('https://harbor.example.com', 'harbor-credentials') {
sh 'docker push harbor.example.com/project/example:tag'
} If you're using a self-signed TLS certificate or one derived from an internal CA, e.g. as you might find in a large corporate environment, then you'll need to configure docker with the CA. But that's part of configuring docker, so not really relevant here. |
Beta Was this translation helpful? Give feedback.
-
I have Jenkins running in my local and Harbor in organization server Can you please breif how to add Certificates and make connections between jenkins and harbor,Finally push the image to harbor? |
Beta Was this translation helpful? Give feedback.
-
Configure docker with CA is bit strucked Can you please help me on this? |
Beta Was this translation helpful? Give feedback.
-
I'm tranforming this to a discussion as it's not an issue that requires eng work. |
Beta Was this translation helpful? Give feedback.
-
Can someone please tell me how to integrate jenkins with harbor through jenkins file?
Beta Was this translation helpful? Give feedback.
All reactions