Glob Patterns

Glob patterns specify sets of file or folder names using wildcard characters.

For file based trigger of the Oracle Cloud Infrastructure DevOps build pipeline, glob patterns are used to specify the files to be included or excluded during the build run. For example, the Unix Bash shell command, mv *.txt textfiles/ moves all files with names ending in .txt from the current directory to the directory name textfiles. Here, * is a wildcard character that implies "any string of characters" and *.txt is a glob pattern.

Glob syntax:

Wildcard Description Example
* Matches any number of any characters, including none. *.txt matches files such as test.txt
? Matches any single character. ?.txt matches files such as a.txt and b.txt
[abc] Matches any one of the characters given in the parentheses. [abc].txt matches files a.txt, b.txt and c.txt
[a-z] Matches one character from the range given in the parentheses. [a-d].txt matches files such as a.txt and d.txt
** Recursive wildcard. /hello/**/* matches all descendants of /hello

The path separator (/ on Unix or \ on Windows) is never matched.