Keep same Docker image SHA key throughout the build

131 views
Skip to first unread message

Rahul Sahotay

unread,
Jun 15, 2018, 10:43:57 AM6/15/18
to Jenkins Users
Hello There:

Happy Friday!

Looking for suggestions from you guys, I am building the pipeline by mostly using Jenkins but seeing some issues. (see images below)

In the first image, I'm seeing what I'm willing to see (or my changes)


but here my college pushed the image and I'm seeing his changes which I'm not supposed 



Is there a plugin where I can keep same SHA throughout the build like git SCM plugin does for me( git plugin keeps commit-id )

Mark Waite

unread,
Jun 15, 2018, 11:34:53 AM6/15/18
to jenkins...@googlegroups.com
I think the answer there is to pull a specifically tagged docker image rather than pulling the image which is tagged "latest".  Docker pull accepts image@DIGEST where DIGEST is the SHA256 checksum of the Docker image.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b33e3d0f-1bbf-42ce-8635-bae942da70dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rahul Sahotay

unread,
Jun 15, 2018, 11:36:40 AM6/15/18
to Jenkins Users
Hello Mark:

That's what my question is, I would like to keep the Digest same throughout my build.
Is there a Plugin I can use which will grab Digest and keep it.

Mark Waite

unread,
Jun 15, 2018, 11:41:01 AM6/15/18
to jenkins...@googlegroups.com
Not that I'm aware of.  You could add returnStdout: true to the "sh" step and then read the digest output in the Pipeline script (since it seems you are performing the "docker pull" from a shell step).

Rahul Sahotay

unread,
Jun 15, 2018, 11:43:09 AM6/15/18
to Jenkins Users
Thank Mark!

I'm looking for some Plugin is it already has that feature
Reply all
Reply to author
Forward
0 new messages