0

I have the following problem : - I created a job, which called "job1", contains four directories. How can I access one of those directories if I created "job2". I am using the declarative pipeline

Example: Let's say the first job1 have the following directories and each directory has some files

  • The directory has (FirstFile -SecondLife - ThirdFile)

The question is: When I create another job "job2". How can I access one of the above files?

  • Is it available to write this line "dir(/workspace/job1/directory/FirstFile)" in second job ?!
  • What did you try so far? Did you consider using artifact copy? Or a shared location on that very build agent you're using? How many build agents are configured. To answer that question more information is required. Please check https://stackoverflow.com/help/how-to-ask. – Joerg S Jul 22 '18 at 13:11
  • I have repos in another job. I just need to access this repo in a new job to pull the latest changes. I just want to use the repo that exists in another job. So I asked whether I can access it by dir() command or not? – Ahmed Mostafa Jul 22 '18 at 15:56
  • 1
    Did you try what you are suggesting with Dir step?! give the output of your try if fail. Because this may work, if in your job 1 you are not doing a clean workspace step wc() – sirineBEJI Jul 22 '18 at 17:30
  • It doesn't work , an error is access denied in workspace folder – Ahmed Mostafa Jul 23 '18 at 09:33
  • Thanks for you support . Now it works with me . I just added the full path – Ahmed Mostafa Jul 23 '18 at 09:44

0 Answers0