declarative: how can agent { docker { image 'foo:latest' }} really get the latest version?

26 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Matt Stave

nieprzeczytany,
19 maj 2017, 13:30:2819.05.2017
do Jenkins Users
If you run such a job the 1st time, all is well.
If you run it again, it may or may not decide to grab the latest version vs. use the one it already has.

I'm not sure if it's finding it on the Jenkins master, or on a local worker.

In my case it's an image built and pushed to a local repo by another Jenkins job, but the job that wants to use it runs independently.

A workaround is to skip using agent to get the image, and do a docker pull (which WILL get the latest one), docker run inside a node{}, but that seems kludgey, as does some sort of agent .. docker:dind + docker.pull, docker.inside ...

If you're using the Docker plugin to have docker-based slaves (which we're not), there's a "pull strategy" config option that has a lovely-sounding "pull once and update latest" option, fwiw.

Andrew Bayer

nieprzeczytany,
24 maj 2017, 08:47:5624.05.2017
do jenkins...@googlegroups.com
It's running on the agent. If the behavior here is wrong, please do open a JIRA. Thanks!


A.

--
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/9fbf5c04-4a34-4007-b2c4-3fbeb08ed872%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0