Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ffaacc4b
Commit
ffaacc4b
authored
Mar 18, 2021
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the FF ci_trigger_payload_into_pipeline
It has been enabled for a milestone
parent
b005bd81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
50 deletions
+7
-50
app/services/ci/pipeline_trigger_service.rb
app/services/ci/pipeline_trigger_service.rb
+1
-5
changelogs/unreleased/321027-remove-ci_trigger_payload_into_pipeline.yml
...leased/321027-remove-ci_trigger_payload_into_pipeline.yml
+5
-0
config/feature_flags/development/ci_trigger_payload_into_pipeline.yml
...re_flags/development/ci_trigger_payload_into_pipeline.yml
+0
-8
doc/ci/triggers/README.md
doc/ci/triggers/README.md
+1
-26
spec/services/ci/pipeline_trigger_service_spec.rb
spec/services/ci/pipeline_trigger_service_spec.rb
+0
-11
No files found.
app/services/ci/pipeline_trigger_service.rb
View file @
ffaacc4b
...
...
@@ -73,11 +73,7 @@ module Ci
end
def
variables
if
::
Feature
.
enabled?
(
:ci_trigger_payload_into_pipeline
,
project
,
default_enabled: :yaml
)
param_variables
+
[
payload_variable
]
else
param_variables
end
param_variables
+
[
payload_variable
]
end
def
param_variables
...
...
changelogs/unreleased/321027-remove-ci_trigger_payload_into_pipeline.yml
0 → 100644
View file @
ffaacc4b
---
title
:
Remove the FF ci_trigger_payload_into_pipeline
merge_request
:
57087
author
:
type
:
other
config/feature_flags/development/ci_trigger_payload_into_pipeline.yml
deleted
100644 → 0
View file @
b005bd81
---
name
:
ci_trigger_payload_into_pipeline
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53837
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/321027
milestone
:
'
13.9'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
true
doc/ci/triggers/README.md
View file @
ffaacc4b
...
...
@@ -188,38 +188,13 @@ source repository. Be sure to URL-encode `ref` if it contains slashes.
### Using webhook payload in the triggered pipeline
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/31197) in GitLab 13.9.
> - It's [deployed behind a feature flag](../../user/feature_flags.md), enabled by default.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-the-trigger_payload-variable). **(FREE SELF)**
WARNING:
This feature might not be available to you. Check the
**version history**
note above for details.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/321027) in GitLab 13.11.
If you trigger a pipeline by using a webhook, you can access the webhook payload with
the
`TRIGGER_PAYLOAD`
[
predefined CI/CD variable
](
../variables/predefined_variables.md
)
.
The payload is exposed as a
[
file-type variable
](
../variables/README.md#custom-cicd-variables-of-type-file
)
,
so you can access the data with
`cat $TRIGGER_PAYLOAD`
or a similar command.
#### Enable or disable the `TRIGGER_PAYLOAD` variable
The
`TRIGGER_PAYLOAD`
CI/CD variable is under development but ready for production use.
It is deployed behind a feature flag that is
**enabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../../administration/feature_flags.md
)
can opt to disable it.
To disable it:
```
ruby
Feature
.
disable
(
:ci_trigger_payload_into_pipeline
)
```
To enable it:
```
ruby
Feature
.
enable
(
:ci_trigger_payload_into_pipeline
)
```
## Making use of trigger variables
You can pass any number of arbitrary variables in the trigger API call and they
...
...
spec/services/ci/pipeline_trigger_service_spec.rb
View file @
ffaacc4b
...
...
@@ -55,17 +55,6 @@ RSpec.describe Ci::PipelineTriggerService do
expect
(
var
.
variable_type
).
to
eq
(
'file'
)
end
context
'when FF ci_trigger_payload_into_pipeline is disabled'
do
before
do
stub_feature_flags
(
ci_trigger_payload_into_pipeline:
false
)
end
it
'does not store the payload as a variable'
do
expect
{
result
}.
not_to
change
{
Ci
::
PipelineVariable
.
count
}
expect
(
result
[
:pipeline
].
variables
).
to
be_empty
end
end
context
'when commit message has [ci skip]'
do
before
do
allow_next
(
Ci
::
Pipeline
).
to
receive
(
:git_commit_message
)
{
'[ci skip]'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment