This page contains information related to upcoming products, features, and functionality.
It is important to note that the information presented is for informational purposes only.
Please do not rely on this information for purchasing or planning purposes.
As with all projects, the items mentioned on this page are subject to change or delay.
The development, release, and timing of any products, features, or functionality remain at the
sole discretion of GitLab Inc.
| Status | Authors | Coach | DRIs | Owning Stage | Created |
|---|---|---|---|---|---|
| proposed | devops verify | - |
GitLab CIイベント提案3:.gitlab/ci/events フォルダの利用
この提案では、イベントのグループごとに別々のファイルを作成したいと思います。以下のような形式でイベントを定義します:
# .gitlab/ci/events/package-published.yml
spec:
events:
- name: package/published
---
include:
- local: .gitlab-ci.yml
with:
event: $[[ gitlab.event.name ]]
そして、.gitlab-ci.yml ファイルでは、入力を使用できます;
# .gitlab-ci.yml
spec:
inputs:
event:
default: push
---
job1:
script: echo "Hello World"
job2:
script: echo "Hello World"
job-for-package-published:
script: echo "Hello World"
rules:
- if: $[[ inputs.event ]] == "package/published"
イベントが発生すると
- イベントのために新しいジョブをエンキューします。
- このジョブは
.gitlab/ci/eventsフォルダ内のイベントファイルを検索します。 - ジョブはイベントファイルに対して
Ci::CreatePipelineServiceを実行します。
問題と質問
- 定義されたイベントが実行されるたびに、新しいジョブをエンキューする必要があります。
- すべてのイベントジョブはファイルを検索する必要があります。
- これはプロジェクトスコープのイベントだけでしょう。
- これはGitLab.comのスケールには使えません。