[workflow-plugin] EXECUTOR_NUMBER

55 views
Skip to first unread message

Gregory Symons

unread,
Jul 6, 2015, 2:00:26 PM7/6/15
to jenkins...@googlegroups.com
Hi, all!

I'm just curious as to why EXECUTOR_NUMBER is unavailable within a workflow script. Is it because it can change between steps? Or is it that until a node is allocated, there's no way to know it? Some other reason? Since it's documented as unavailable, I assume there is a reason behind the decision.

Here's the use case that motivates my question. I have a build where I'm building in a Docker container that contains my build toolchain (essentially Java 7 + sbt-extras). So that I don't have to wait to download the appropriate sbt and dependencies on every build, I'm mounting my sbt and ivy caches as volumes in a data container that persists across builds. In order to avoid contention between concurrent builds modifying these caches, I wanted to have a separate data container per executor on the node. But there's no way to know what executor I'm running on without EXECUTOR_NUMBER. Can anybody suggest a different way to do this?

Thanks,

Greg

Jesse Glick

unread,
Aug 12, 2015, 4:51:59 PM8/12/15
to Jenkins Users
File an RFE blocking JENKINS-28131. Would be a very easy fix (not that I am promising anything).
Reply all
Reply to author
Forward
0 new messages