The placement of the `checkout' step in `matrix' pipeline jobs

6 views
Skip to first unread message

Anton Shepelev

unread,
Sep 1, 2020, 10:24:15 AM9/1/20
to jenkins...@googlegroups.com
Hello, all

How is `matrix' supposed to interact with `checkout'? If I
have several axes, of which some require change of agent (OS
version), and some do not (Debug or Release mode), where
shall place the `checkout' step? Currently, I have it at
this path in my Jenkinsfile:

pipeline -> stages -> stage('All') ->
matrix -> stages -> stage('Build') -> steps

-- that is, inside a matrix cell. Therefore, a checkout is
executed for each cell, regardless of whether it had already
been done on the same agent machine. Is it intended usage of
the `matrix' element? If not, how can I cause checkout to
be performed once per agent, rather than once per matrix
cell?

Reply all
Reply to author
Forward
0 new messages