0

Here is my bitbucket-pipelines.yml:

pipelines:
  branches:
    feature/*:
      - step:
          name: test artifacts
          script:
            - mkdir abc
            - echo "abc1" > abc/testartifacts.txt
          artifacts:
            - abc
      - step:
          script:
            - ls -altrh
            - cat abc/*

In the second step abc/ is not present... Why? What am I doing wrong

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286

1 Answers1

1

If needing a whole directory stored you need to use dir/** syntax...

     artifacts:
        - abc/**

Limitations:

THIS WILL NOT STORE EMPTY DIRECTORIES...

This would ideally initially produced an error or warning then if dir is invalid.

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
  • 1
    Everything around artifacts could help some warnings https://stackoverflow.com/q/56196454/11715259 – N1ngu Mar 16 '23 at 14:48