Hi, Chritoph Nenning, Thanks for your answer.
>AFAIK you cannot use the workspace that jenkins creates to checkout Jenkinsfile. So, it means as you say after, that I need to checkout agoin files I already checked out just before. That's what I wanted to avoid. Simply because I don't like to do twice the same thing. So, as far as this behavior seems confirmed, and we want to avoid repeating things, it means that an effort must be made on scm repository side to clearly separate things that are yet related. It is not a so big deal. On the other hand, the volume of data involved here are not so big. It should not have a noticeable impact on the whole pipeline process, and thus the question is perhaps finally more a matter of principle. There should be no heavy consequences as far as things are correctly done on SCM repository side. Again, thanks for your help. Have a nide day. J.L.P. 2016-12-05 9:30 GMT+01:00 Christoph Nenning <[email protected]>: > Hi, > > > > Where do you put this ws step ? > > You can put it at the beginning of your Jenkinsfile > > > > My concern is how to benefit from the SCM schedule and checkout > > phase made to retrieve the so called jenkinsfile, i.e. the script > > (and possible libraries) that is executed to run the pipeline. > > AFAIK you cannot use the workspace that jenkins creates to checkout > Jenkinsfile. > > But you can checkout the same repo (or other polled SCM URLs) with this > command: > > checkout scm > > > Regards, > Christoph > > > > > From: Jean-Luc Pinardon <[email protected]> > > To: [email protected], > > Date: 05.12.2016 09:05 > > Subject: Re: Jenkins Pipeline : How could I access the git > > repository cloned at job start > > Sent by: [email protected] > > > > Hello, > > > > Thanks for your answer. > > But I am not sure to understand. > > Where do you put this ws step ? > > I am not sure to have been clear enough. > > My concern is how to benefit from the SCM schedule and checkout > > phase made to retrieve the so called jenkinsfile, i.e. the script > > (and possible libraries) that is executed to run the pipeline. > > > > 2016-12-03 7:37 GMT+01:00 Sam K <[email protected]>: > > I just use a ws('<some predetermined space>') { > > git url:..... , branch: 'master' > > } > > > > and now all the cloned content is within the directory I want. > > > > On Tuesday, November 29, 2016 at 1:14:03 AM UTC-8, Jean-Luc Pinardon > wrote: > > Dear all, > > > > I am exploring pipeline features, and I fall into a problem. > > The repository is indeed correctly cloned at job start and the > > "jenkinsfile" is run. > > But I "discover" that I cannot access the cloned files from within > > the stages within nodes. Just because, the workspace used at job > > begin is certainly not the same as the workspace within the nodes. > > > > So, my question is : is there a way to make available the initially > > cloned files all over the pipeline, or should I clone the repository > > once more within the first stage and then stash the files I need. > > > > Thanks for your help. > > J.L.P. > > -- > > You received this message because you are subscribed to a topic in > > the Google Groups "Jenkins Users" group. > > To unsubscribe from this topic, visit https://groups.google.com/d/ > > topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > > [email protected]. > > To view this discussion on the web visit https://groups.google.com/ > > d/msgid/jenkinsci-users/aca57995-52c2-42f6-94aa-5cee7e434b29% > > 40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > > 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 [email protected]. > > To view this discussion on the web visit https://groups.google.com/ > > d/msgid/jenkinsci-users/CALijN65Q_TE2zj5NhwJpoi5%2BW3jX- > > vVXds0QVJrXO4iKs72Wkw%40mail.gmail.com. > > For more options, visit https://groups.google.com/d/optout. > > > This Email was scanned by Sophos Anti Virus > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/OFE7E55BA0.1AC16254-ONC1258080.002E9363-C1258080. > 002EBDB0%40lex-com.net > <https://groups.google.com/d/msgid/jenkinsci-users/OFE7E55BA0.1AC16254-ONC1258080.002E9363-C1258080.002EBDB0%40lex-com.net?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALijN66gChfCfvaV0snVtHD%3DwTCm5y2DQrvCS0BgNkYgmKKxOg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
