Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
40e3a701
提交
40e3a701
编辑于
8 years ago
作者:
Achilleas Pipinellis
浏览文件
操作
下载
差异文件
Merge branch 'triggers-docs' into 'master'
Triggers docs See merge request !10050
上级
7181b345
6cf8d343
No related branches found
分支 包含提交
No related tags found
标签 包含提交
无相关合并请求
变更
3
隐藏空白变更内容
行内
左右并排
显示
3 个更改的文件
doc/ci/triggers/README.md
+21
-3
21 个添加, 3 个删除
doc/ci/triggers/README.md
doc/ci/triggers/img/triggers_page.png
+0
-0
0 个添加, 0 个删除
doc/ci/triggers/img/triggers_page.png
doc/user/project/new_ci_build_permissions_model.md
+5
-5
5 个添加, 5 个删除
doc/user/project/new_ci_build_permissions_model.md
有
26 个添加
和
8 个删除
doc/ci/triggers/README.md
+
21
−
3
浏览文件 @
40e3a701
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
-
[
Introduced
][
ci-229
]
in GitLab CE 7.14.
-
[
Introduced
][
ci-229
]
in GitLab CE 7.14.
-
GitLab 8.12 has a completely redesigned job permissions system. Read all
-
GitLab 8.12 has a completely redesigned job permissions system. Read all
about the
[
new model and its implications
](
../../user/project/new_ci_build_permissions_model.md#job-triggers
)
.
about the
[
new model and its implications
](
../../user/project/new_ci_build_permissions_model.md#job-triggers
)
.
-
GitLab 9.0 introduced a trigger ownership to solve permission problems.
Triggers can be used to force a rebuild of a specific
`ref`
(branch or tag)
Triggers can be used to force a rebuild of a specific
`ref`
(branch or tag)
with an API call.
with an API call.
...
@@ -21,13 +22,30 @@ overview of the time the triggers were last used.
...
@@ -21,13 +22,30 @@ overview of the time the triggers were last used.


## Take ownership
Each created trigger when run will impersonate their associated user including
their access to projects and their project permissions.
You can take ownership of existing triggers by clicking
*Take ownership*
.
From now on the trigger will be run as you.
## Legacy triggers
Old triggers, created before 9.0 will be marked as Legacy. Triggers with
the legacy label do not have an associated user and only have access
to the current project.
Legacy trigger are considered deprecated and will be removed
with one of the future versions of GitLab.
## Revoke a trigger
## Revoke a trigger
You can revoke a trigger any time by going at your project's
You can revoke a trigger any time by going at your project's
**Settings > Triggers**
and hitting the
**Revoke**
button. The action is
**Settings > Triggers**
and hitting the
**Revoke**
button. The action is
irreversible.
irreversible.
## Trigger a
job
## Trigger a
pipeline
> **Note**:
> **Note**:
Valid refs are only the branches and tags. If you pass a commit SHA as a ref,
Valid refs are only the branches and tags. If you pass a commit SHA as a ref,
...
@@ -63,7 +81,7 @@ below.
...
@@ -63,7 +81,7 @@ below.
See the
[
Examples
](
#examples
)
section for more details on how to actually
See the
[
Examples
](
#examples
)
section for more details on how to actually
trigger a rebuild.
trigger a rebuild.
## Trigger a
job
from webhook
## Trigger a
pipeline
from webhook
> Introduced in GitLab 8.14.
> Introduced in GitLab 8.14.
...
@@ -117,7 +135,7 @@ curl --request POST \
...
@@ -117,7 +135,7 @@ curl --request POST \
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline?token=TOKEN&ref=master"
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline?token=TOKEN&ref=master"
```
```
### Triggering a
job
within `.gitlab-ci.yml`
### Triggering a
pipeline
within `.gitlab-ci.yml`
You can also benefit by using triggers in your
`.gitlab-ci.yml`
. Let's say that
You can also benefit by using triggers in your
`.gitlab-ci.yml`
. Let's say that
you have two projects, A and B, and you want to trigger a rebuild on the
`master`
you have two projects, A and B, and you want to trigger a rebuild on the
`master`
...
...
此差异已折叠。
点击以展开。
doc/ci/triggers/img/triggers_page.png
+
0
−
0
查看替换文件 @
7181b345
浏览文件 @
40e3a701
5.0 KB
|
W:
|
H:
108.0 KB
|
W:
|
H:
2-up
Swipe
Onion skin
此差异已折叠。
点击以展开。
doc/user/project/new_ci_build_permissions_model.md
+
5
−
5
浏览文件 @
40e3a701
...
@@ -87,12 +87,12 @@ your Runners in the most possible secure way, by avoiding the following:
...
@@ -87,12 +87,12 @@ your Runners in the most possible secure way, by avoiding the following:
By using an insecure GitLab Runner configuration, you allow the rogue developers
By using an insecure GitLab Runner configuration, you allow the rogue developers
to steal the tokens of other jobs.
to steal the tokens of other jobs.
##
job
triggers
##
Pipeline
triggers
[
job
triggers
][
triggers
]
do
not
support the new permission model.
Since 9.0
[
pipelnie
triggers
][
triggers
]
do support the new permission model.
The
y continue to use the old authentication mechanism where the CI job
The
new triggers do impersonate their associated user including their access
can access only its own sources. We plan to remove that limitation in one of
to projects and their project permissions. To migrate trigger to use new permisison
the upcoming releases
.
model use
**Take ownership**
.
## Before GitLab 8.12
## Before GitLab 8.12
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录