Hi Josh, Because both the stages are independent as they consist of job/s which are independent and run in parallel. Agent will not have access to these folder (folder/files from previous stage) unless they are sent to server, from where agent fetches these folder through fetchartifact task.
You'll need to publish "buildtmp" and "installtmp" folder from stage 1 as build artifact to make them available to downstream pipeline or to subsequent stage. You can read more here <https://docs.gocd.org/current/configuration/managing_artifacts_and_reports.html> on how to publish artifact. Below can be your publish artifact setup- <artifacts> <artifact src="buildtmp" /> </artifacts> <artifacts> <artifact src="installtmp" /> </artifacts> Once you publish them in stage1, you can fetch them in stage2 using fetchartifact task <https://docs.gocd.org/current/configuration/configuration_reference.html#fetchartifact> and then can use them in stage2/job/task. Make sure to keep the fetchartifact task on the top of task list. <tasks> <fetchartifact pipeline="" stage="stage1" job="defaultJob" srcdir="buildtmp"> <runif status="passed" /> </fetchartifact> Regards, Ankit On Wed, Jan 10, 2018 at 8:13 AM, Josh <[email protected]> wrote: > Hello thank you for your interesting product which we just started using > at my company. > > > We presently have 3 product pipelines up and running with 5 company repos > running successfully. > > > We're trying to go full cd with some of our 3rd party dependencies. > Having a problem creating two temporary directories required for this > pipeline, which builds a git repo and has these initial stages/jobs : > > > stage# > > 1) pwd / mkdir buildtmp / mkdir installtmp <-- this passes > > 2) cmake <--- this fails saying that buildtmp doesn't exist > > ... > > > In output we can see the directories being created in stage1. But when > stage2 tries to enter this directory, it no longer exists. We do not > remove any directories in any of our scripts, is there some sort of > cleaning/reverting that is happening in-between stages? > > > This is the first pipeline we have done with git, our other working > pipelines use subversion. > > Very confused as to why this is happening and how to troubleshoot it. > > > Here are the log entries.... making directories in stage1 > > > ---------------------- > > ##|05:54:05.744 [go] Start to build emgu32/2/EmguPrep/1/MakeFolders on > conway [/mnt/sdb1/gocd/go-agent-17.12.0] > > !!|05:54:05.744 [go] Task: pwd > &1|05:54:05.745 /mnt/sdb1/gocd/go-agent-17.12.0/pipelines/emgu32 > ?0|05:54:05.845 [go] Task status: passed (101 ms) > !!|05:54:05.845 [go] Task: mkdir buildtmp > ?0|05:54:05.848 [go] Task status: passed (3 ms) > !!|05:54:05.848 [go] Task: mkdir installtmp > ?0|05:54:05.851 [go] Task status: passed (3 ms) > j0|05:54:05.859 [go] Current job status: passed > > --------------- > > > Then the immediate next task in stage2: > > --------------- > > &2|05:54:25.551 Working directory > "/mnt/sdb1/gocd/go-agent-17.12.0/pipelines/emgu32/buildtmp" is not a > directory! > ?1|05:54:25.551 [go] Task status: failed (0 ms) > > ---------------- > > > > > I do see this message early in the stage2 task, which appears to be removing > these files: > > ------------------ > > pr|05:54:25.345 [GIT] Cleaning all unversioned files in working copy > > ------------------ > > > I am not familiar with this behavior in git/gocd. Can I turn this off? I > don't see any setting like this in the job, stage, pipeline or material. > > > Appreciate guidance as to why this is occuring and how best to allow for > temporary build folders. > > > thx > > > -j > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
