To have a bash double-star (globstar
) pattern traverse into sub-directories, the slash character is required.
Specify your paths with a **/*.extension
format, allowing **
to match sub-directories and *.extension
to match a specific type of file found:
.unity_long_artifacts: &unity_long_artifacts
artifacts:
name: "${CI_JOB_NAME}-${CI_PIPELINE_ID}"
expire_in: 2 days
when: always
paths:
- "**/*.log"
- "**/*.apk"
- "**/*.aab"
- "**/*.ipa"
- "**/*.dsym"
P.s. Looking deeper, GitLab Runner doesn’t exactly use a bash shell underneath when doing the matches. It uses Go and the doublestar library to glob-match the filesystem paths. Here’s a test in Go Playground exercising what works and does not.