Commit ffaacc4b authored by Furkan Ayhan's avatar Furkan Ayhan

Remove the FF ci_trigger_payload_into_pipeline

It has been enabled for a milestone
parent b005bd81
...@@ -73,11 +73,7 @@ module Ci ...@@ -73,11 +73,7 @@ module Ci
end end
def variables def variables
if ::Feature.enabled?(:ci_trigger_payload_into_pipeline, project, default_enabled: :yaml) param_variables + [payload_variable]
param_variables + [payload_variable]
else
param_variables
end
end end
def param_variables def param_variables
......
---
title: Remove the FF ci_trigger_payload_into_pipeline
merge_request: 57087
author:
type: other
---
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
...@@ -188,38 +188,13 @@ source repository. Be sure to URL-encode `ref` if it contains slashes. ...@@ -188,38 +188,13 @@ source repository. Be sure to URL-encode `ref` if it contains slashes.
### Using webhook payload in the triggered pipeline ### Using webhook payload in the triggered pipeline
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/31197) in GitLab 13.9. > - [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. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/321027) in GitLab 13.11.
> - 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.
If you trigger a pipeline by using a webhook, you can access the webhook payload with 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 `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), 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. 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 ## Making use of trigger variables
You can pass any number of arbitrary variables in the trigger API call and they You can pass any number of arbitrary variables in the trigger API call and they
......
...@@ -55,17 +55,6 @@ RSpec.describe Ci::PipelineTriggerService do ...@@ -55,17 +55,6 @@ RSpec.describe Ci::PipelineTriggerService do
expect(var.variable_type).to eq('file') expect(var.variable_type).to eq('file')
end 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 context 'when commit message has [ci skip]' do
before do before do
allow_next(Ci::Pipeline).to receive(:git_commit_message) { '[ci skip]' } allow_next(Ci::Pipeline).to receive(:git_commit_message) { '[ci skip]' }
......
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