Skip to content
代码片段 群组 项目
提交 c54fff97 编辑于 作者: Niklas's avatar Niklas 提交者: Lin Jen-Shin
浏览文件

Disable pipelines on default branch for non canonical projects

We regularly see community contributors running out of pipeline minutes
because they forgot to use `-o ci.skip` while pushing the updated
master branch to their fork.

Currently we advise them to switch to the community fork to prevent them
to use up their quota again, but that doesn't help them in the current
month when they also use CI for other projects in their namespace.

We can disable these pipelines entirely as they serve no purpose on forks.
This should help community contributors to not accidentially use up their
entire pipeline minutes quota for the rest of the month.
上级 d73eec92
No related branches found
No related tags found
无相关合并请求
......@@ -105,6 +105,11 @@ workflow:
<<: [*default-ruby-variables, *default-branch-pipeline-failure-variables]
GITLAB_DEPENDENCY_PROXY_ADDRESS: ""
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline (triggered by a project token)'
# For `$CI_DEFAULT_BRANCH` from wider community contributors, we don't want to run any pipelines on pushes,
# because normally we want to run merge request pipelines and scheduled pipelines, not for repository synchronization.
# This can avoid accidentally using up pipeline minutes quota while synchronizing the repository for wider community contributors.
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE !~ /^gitlab(-org|-cn)?($|\/)/'
when: never
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
variables:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册