Referencing a file in the repo

I am running a Powershell action in my build.  The script is trying to access a module that is located in another folder in the repository.  However, the folder is not being brought into the workspace.  

Script being run is in:

$Source.MY-REPO$\V2\Bus\Common\blah-blah-blah\build.ps1

The script is referencing:

$Source.MY-REPO$\V2\Bus\SOME-FOLDER

How can I make bring the folders I need across, or otherwise reference them?

Hi Sean

You need to make sure your repository rules are set to include the source you need :

http://wiki.finalbuilder.com/display/continua/Repository+Rules

If you haven’t touched the repository rules then the default (for the first stage at least) is to put everything into the workspace. Are you sure your script is not using hard coded paths? If so, change them to relative paths because each build is done in it’s own individual workspace folder.

Hi Vincent

What a great feature - didn’t know about that one!

I only have one stage so far, and my rules are the default configuration:


#Source rules
#---------------------------------------------------
#export all source to agent workspace
$Source$ > Source
#---------------------------------------------------


The PS script is actually doing a search of parent directories from the script’s folder, so there’s nothing hard coded going on.

Any ideas for what to try now?

On the rules tab, turn on the option to log the source files, that will at least tell you what source is on the agent. Don’t forget to turn it off when you are done though as it will slow down your builds

My bad - turns out what the script was looking for wasn’t checked in! Many thanks for your help again.