Allow backwards recursive artifact definition for Pipelines

Issue #17855 resolved
Leonardo Montiel staff created an issue

Let's suppose we have a directory tree that looks like this in this case:

a
|
-test
  |
  -test1.txt
|
b
|
-test
  |
  -test2.txt
|
test
|
-test3.txt

On Pipelines, it's possible to define recursive artifacts for folders below the specified folder using glob patterns like this:

artifacts:
  - test/**

On our directory tree above, this would only fetch the "test3.txt"file

However, it's not possible to use a glob pattern to fetch every folder with the same name under every existing folder recursively, like this:

artifacts:
  - **/test

^The validator does not allow a definition like this. In this case, the desired behavior would be to fetch the test1.txt and test2.txt files without having to manually define the artifacts like this:

artifacts:
  - a/**
  - b/**

Comments (2)

  1. Aneita Yang staff

    Thanks for reaching out.

    This is already supported today - in your YML file, you will need to put the artifact definition in quotes e.g. - '**/test'. This is because * is a special character in YML.

  2. Brian Anstett

    @Aneita Yang would something like '**/node_modules/**' work with a structure like the following? All files inside the node_modules directory in each project sub directory?

    /
     \ service1/
       \ node_modules
    
     \ service2
       \ node_modules
    
  3. Log in to comment