Commit 7b89358f authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 70ca44f2 ed29856f
...@@ -1393,7 +1393,9 @@ job: ...@@ -1393,7 +1393,9 @@ job:
- Dockerfile - Dockerfile
``` ```
You can also use glob patterns to match multiple files in any directory in the repository: Paths are relative to the project directory (`$CI_PROJECT_DIR`) and can't directly link outside it.
You can use glob patterns to match multiple files in any directory in the repository:
```yaml ```yaml
job: job:
...@@ -1403,6 +1405,9 @@ job: ...@@ -1403,6 +1405,9 @@ job:
- spec/**.rb - spec/**.rb
``` ```
Glob patterns are interpreted with Ruby [File.fnmatch](https://docs.ruby-lang.org/en/2.7.0/File.html#method-c-fnmatch)
with the flags `File::FNM_PATHNAME | File::FNM_DOTMATCH | File::FNM_EXTGLOB`.
For performance reasons, using `exists` with patterns is limited to 10,000 For performance reasons, using `exists` with patterns is limited to 10,000
checks. After the 10,000th check, rules with patterned globs always match. checks. After the 10,000th check, rules with patterned globs always match.
......
...@@ -231,7 +231,7 @@ module Trigger ...@@ -231,7 +231,7 @@ module Trigger
# Remove a remote branch in gitlab-docs. # Remove a remote branch in gitlab-docs.
# #
def cleanup! def cleanup!
Gitlab.delete_branch(downstream_project_path, ref) gitlab_client(:downstream).delete_branch(downstream_project_path, ref)
puts "=> Remote branch '#{downstream_project_path}' deleted" puts "=> Remote branch '#{downstream_project_path}' deleted"
end end
...@@ -275,7 +275,7 @@ module Trigger ...@@ -275,7 +275,7 @@ module Trigger
end end
def create_remote_branch! def create_remote_branch!
Gitlab.create_branch(downstream_project_path, ref, 'master') gitlab_client(:downstream).create_branch(downstream_project_path, ref, 'master')
puts "=> Remote branch '#{ref}' created" puts "=> Remote branch '#{ref}' created"
rescue Gitlab::Error::BadRequest rescue Gitlab::Error::BadRequest
puts "=> Remote branch '#{ref}' already exists!" puts "=> Remote branch '#{ref}' already exists!"
...@@ -288,7 +288,7 @@ module Trigger ...@@ -288,7 +288,7 @@ module Trigger
loop do loop do
sleep 1 sleep 1
puts "=> Waiting for pipeline to start..." puts "=> Waiting for pipeline to start..."
pipelines = Gitlab.pipelines(downstream_project_path, { ref: ref }) pipelines = gitlab_client(:downstream).pipelines(downstream_project_path, { ref: ref })
break if pipelines.any? break if pipelines.any?
end end
...@@ -296,7 +296,7 @@ module Trigger ...@@ -296,7 +296,7 @@ module Trigger
pipeline_id = pipelines.first.id pipeline_id = pipelines.first.id
# Cancel the pipeline # Cancel the pipeline
Gitlab.cancel_pipeline(downstream_project_path, pipeline_id) gitlab_client(:downstream).cancel_pipeline(downstream_project_path, pipeline_id)
end end
def display_success_message def display_success_message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment