Hi, Thanks a lot for the explanation. In fact, I must come back to the very first reason of my question. My concern is that the jenkinsfile, so the pipeline, is supposed to be executed by taking first into account a property file that will be used to configure the whole build chain. So it seemed very natural to checkout the jenkinsfile and its property file along with to set up the environment of the pipeline. That would perhaps be an interesting feature...
Thanks for your help J.L.P. 2016-12-05 10:33 GMT+01:00 nicolas de loof <nicolas.del...@gmail.com>: > the Jenkinsfile detection indeed relies on a git clone on master, but this > isn't considered a workspace. Also, it might not be necessary for some > integrations, typically one could access this specific file remotely (not > sure about the actual implementation) > > To get the exact commit that triggered a build, your Jenkinsfile should > look like : > > node() { > checkout scm > ... > } > > > > 2016-12-05 9:30 GMT+01:00 Christoph Nenning <christoph.nenn...@lex-com.net > >: > >> 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 <jl.pinar...@gmail.com> >> > To: jenkinsci-users@googlegroups.com, >> > Date: 05.12.2016 09 <05%2012%2020%2016%2009>:05 >> > Subject: Re: Jenkins Pipeline : How could I access the git >> > repository cloned at job start >> > Sent by: jenkinsci-users@googlegroups.com >> > >> > 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 <sreeram...@gmail.com>: >> > 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 >> > jenkinsci-users+unsubscr...@googlegroups.com. >> > 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 jenkinsci-users+unsubscr...@googlegroups.com. >> > 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 the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/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 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 > jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/CANMVJzmgh7jBd%2B6JbL_16J5TsnsAMpDmOiEX4WkK6vmqzfoWU > Q%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzmgh7jBd%2B6JbL_16J5TsnsAMpDmOiEX4WkK6vmqzfoWUQ%40mail.gmail.com?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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALijN649uCv7mochQUPxt1a%2B2f%3D5PHRiObtEXF3pv5qnw3XzRA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.