Hi everyone,

I am starting with the git-path plugin and I am having trouble 
understanding how it should be configured to ensure the files end up where 
I expect them when the agent fetches them.

I am working with a pipeline that uses the following materials (whittled 
down to what I understand to be the relevant bits):

    materials:
      App.Trunk:
        plugin_configuration:
          id: "git-path"
        options:
          url: https://dev.azure.com/Org/Project/_git/App
          path: Trunk
        destination: source/Project/App/Trunk
      App.Documents.Spec:
        plugin_configuration:
          id: "git-path"
        options:
          url: https://dev.azure.com/Org/Project/_git/App
          path: Documents/Spec
        destination: source/Project/App/Documents/Spec

The intention was that the contents of App$/Trunk should be placed in 
source/Project/App/Trunk and the contents of App$/Documents/Spec should be 
placed in source/Project/App/Documents/Spec. Instead, the plugin seems to 
be fetching the entire repo into each of the destinations. Is this the 
expected behaviour?

If so, are there any guidelines for how to deal with multiple git-path 
materials that need to poll different paths in a single repo, while 
ensuring that the relative paths remain intact on the agent at job run time?

Things that I need to consider:

   - App.Trunk and App.Documents.Spec are likely to be reused across 
   various pipelines, though not necessarily always together.
   - We probably do not want to configure a custom git-path material for 
   every existing combination of paths.
   - There is a significant amount of cross-repository code, so relative 
   paths both inside and across repositories can be relevant. (I.E., for any 
   given file, the right version of that file needs to be downloaded to 
   "./Project/Repo/path/to/file".)


I'm thinking I will need to pull the git-path materials into a separate 
location, then copy the relevant files to the expected location in the 
first (few) task(s) of the job. (E.G., fetch them into 
./git-path/<materialName>, then copy "./git-path/App.Trunk/Trunk" to 
"./source/Project/App/Trunk" ) This feels incredibly hacky, though. Are 
there any cleaner options?

Any feedback or advice is appreciated.

Cheers,
Jason Smyth

-- 
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].
To view this discussion visit 
https://groups.google.com/d/msgid/go-cd/980e4698-9127-4a54-bb00-9b9f7d9189ccn%40googlegroups.com.

Reply via email to