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
98b94d74
Commit
98b94d74
authored
Feb 15, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_custom_yaml_tags feature flag
Remove ci_custom_yaml_tags feature flag
parent
d6d09424
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
58 deletions
+8
-58
changelogs/unreleased/remove-ci-custom-tags-ff-300155.yml
changelogs/unreleased/remove-ci-custom-tags-ff-300155.yml
+5
-0
config/feature_flags/development/ci_custom_yaml_tags.yml
config/feature_flags/development/ci_custom_yaml_tags.yml
+0
-8
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+0
-26
lib/gitlab/ci/config.rb
lib/gitlab/ci/config.rb
+1
-18
lib/gitlab/ci/config/external/file/base.rb
lib/gitlab/ci/config/external/file/base.rb
+1
-5
lib/gitlab/ci/config/yaml.rb
lib/gitlab/ci/config/yaml.rb
+1
-1
No files found.
changelogs/unreleased/remove-ci-custom-tags-ff-300155.yml
0 → 100644
View file @
98b94d74
---
title
:
Add '!reference' YAML tag to help merge CI configurations
merge_request
:
54198
author
:
type
:
added
config/feature_flags/development/ci_custom_yaml_tags.yml
deleted
100644 → 0
View file @
d6d09424
---
name
:
ci_custom_yaml_tags
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52104
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/300155
milestone
:
'
13.9'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
false
doc/ci/yaml/README.md
View file @
98b94d74
...
...
@@ -4600,13 +4600,6 @@ into templates.
### `!reference` tags
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/266173) in GitLab 13.9.
> - It's [deployed behind a feature flag](../../user/feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-reference-tags). **(FREE SELF)**
WARNING:
This feature might not be available to you. Check the
**version history**
note above for details.
Use the
`!reference`
custom YAML tag to select keyword configuration from other job
sections and reuse it in the current section. Unlike
[
YAML anchors
](
#anchors
)
, you can
...
...
@@ -4666,25 +4659,6 @@ test-vars-2:
You can't reuse a section that already includes a
`!reference`
tag. Only one level
of nesting is supported.
#### Enable or disable `!reference` tags **(FREE SELF)**
The
`!reference`
tag is under development and not ready for production use. It is
deployed behind a feature flag that is
**disabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../../administration/feature_flags.md
)
can enable it.
To enable it:
```
ruby
Feature
.
enable
(
:ci_custom_yaml_tags
)
```
To disable it:
```
ruby
Feature
.
disable
(
:ci_custom_yaml_tags
)
```
## Skip Pipeline
To push a commit without triggering a pipeline, add
`[ci skip]`
or
`[skip ci]`
, using any
...
...
lib/gitlab/ci/config.rb
View file @
98b94d74
...
...
@@ -90,15 +90,7 @@ module Gitlab
end
def
build_config
(
config
)
if
::
Feature
.
enabled?
(
:ci_custom_yaml_tags
,
@context
.
project
,
default_enabled: :yaml
)
build_config_with_custom_tags
(
config
)
else
build_config_without_custom_tags
(
config
)
end
end
def
build_config_with_custom_tags
(
config
)
initial_config
=
Config
::
Yaml
.
load!
(
config
,
project:
@context
.
project
)
initial_config
=
Config
::
Yaml
.
load!
(
config
)
initial_config
=
Config
::
External
::
Processor
.
new
(
initial_config
,
@context
).
perform
initial_config
=
Config
::
Extendable
.
new
(
initial_config
).
to_hash
initial_config
=
Config
::
Yaml
::
Tags
::
Resolver
.
new
(
initial_config
).
to_hash
...
...
@@ -107,15 +99,6 @@ module Gitlab
initial_config
end
def
build_config_without_custom_tags
(
config
)
initial_config
=
Gitlab
::
Config
::
Loader
::
Yaml
.
new
(
config
).
load!
initial_config
=
Config
::
External
::
Processor
.
new
(
initial_config
,
@context
).
perform
initial_config
=
Config
::
Extendable
.
new
(
initial_config
).
to_hash
initial_config
=
Config
::
EdgeStagesInjector
.
new
(
initial_config
).
to_hash
initial_config
end
def
build_context
(
project
:,
sha
:,
user
:,
parent_pipeline
:)
Config
::
External
::
Context
.
new
(
project:
project
,
...
...
lib/gitlab/ci/config/external/file/base.rb
View file @
98b94d74
...
...
@@ -60,11 +60,7 @@ module Gitlab
def
content_hash
strong_memoize
(
:content_yaml
)
do
if
::
Feature
.
enabled?
(
:ci_custom_yaml_tags
,
context
.
project
,
default_enabled: :yaml
)
::
Gitlab
::
Ci
::
Config
::
Yaml
.
load!
(
content
)
else
Gitlab
::
Config
::
Loader
::
Yaml
.
new
(
content
).
load!
end
::
Gitlab
::
Ci
::
Config
::
Yaml
.
load!
(
content
)
end
rescue
Gitlab
::
Config
::
Loader
::
FormatError
nil
...
...
lib/gitlab/ci/config/yaml.rb
View file @
98b94d74
...
...
@@ -7,7 +7,7 @@ module Gitlab
AVAILABLE_TAGS
=
[
Config
::
Yaml
::
Tags
::
Reference
].
freeze
class
<<
self
def
load!
(
content
,
project:
nil
)
def
load!
(
content
)
ensure_custom_tags
Gitlab
::
Config
::
Loader
::
Yaml
.
new
(
content
,
additional_permitted_classes:
AVAILABLE_TAGS
).
load!
...
...
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