Restricting pipeline stage to single executor?

16 views
Skip to first unread message

nk

unread,
Dec 1, 2017, 10:40:20 AM12/1/17
to jenkins...@googlegroups.com
I have a pipeline stage that does the following:

* login to ECR (via groovy script in pipeline library)
* docker build (via groovy script in pipeline library)
* docker push to ECR (via groovy script in pipeline library)

The problem I'm seeing is that any of these steps can run on a different
executor (in the same slave) from the other steps. This results in a docker
push failing on one executor because the login to ECR happened in another
executor.

1. Is there a better pattern/practice I should be using?
2. Is there a way to force jenkins to use the same executor for all these
steps?

Thanks!



--
Sent from: http://jenkins-ci.361315.n4.nabble.com/Jenkins-users-f361316.html

Slide

unread,
Dec 1, 2017, 10:43:36 AM12/1/17
to jenkins...@googlegroups.com
Do you have a node() {} around your stage?

--
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/1512072153155-0.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages