Sharan,

Daniel was trying to tell you that you're misunderstanding what is a
workspace and what isn't a workspace.

The place where you're finding the Jenkinsfile is a temporary holding
location that exists for the purpose of reading the Jenkinsfile.  It is not
a workspace.  It is not a place where you should expect to find the rest of
your code.  At the moment, that temporary holding location happens to also
include other files, but that is more an accident of the nature of git than
it is a capability on which you can rely.

In order to use your source code in a Jenkins pipeline, you need to
checkout that source code in one of the early stages of your pipeline.  The
examples you've shared don't seem to include a "checkout scm" step, so you
have no sources to use.

For examples of the syntax of "checkout scm", you can use the "Pipeline
Syntax" hyperlink on the left of pipeline job pages.

Mark Waite

On Sat, Feb 11, 2017 at 7:08 AM Sharan Basappa <sharan.basa...@gmail.com>
wrote:

> Daniel,
>
> Don't try to be clever here. `checkout scm`.
>
> You are giving me more credit than I deserve.
>
> I really don't understand how source files from Git can appear in the
> workspace and .git dir is missing.
> In fact, for all the source files corresponding to every branch, there is
> no .git dir.
> I have seen this issue only when I started using multibranch pipeline and
> not with pipeline or other build job types.
> Also, in this case alone, I am using Jenkinsfile driven build steps
>
>
> On Saturday, 11 February 2017 15:16:23 UTC+5:30, Daniel Beck wrote:
>
>
> > On 11.02.2017, at 05:02, Sharan Basappa <sharan....@gmail.com> wrote:
> >
> > 3) I am not checking out any repository explicitly in my Jenkinsfile - I
> still find source code in the workspace through
>
> That's probably the reason, and the reason it's in a wrong directory.
> Don't try to be clever here. `checkout scm`.
>
> --
> 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/eebf0cb3-d3ec-4298-bef9-8ed3baa87bb8%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/eebf0cb3-d3ec-4298-bef9-8ed3baa87bb8%40googlegroups.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/CAO49JtH7ZFbjimDGXrGczp3DHDYYSaFc96FmKv%3D8VJ8B68hH%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to