Commit 2c9f04a0 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents e9900469 5370fb42
---
stage: none
group: none
info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-development-guidelines"
description: "View features that are currently deprecated"
---
# Deprecated features by planned removal milestone
<!--
This page is automatically generated from the YAML files in `/data/deprecations` by the rake task
located at `lib/tasks/gitlab/docs/compile_deprecations.rake`.
Do not edit this page directly.
To add a deprecation, use the example.yml file in `/data/deprecations/templates` as a template,
then run `bin/rake gitlab:docs:compile_deprecations`.
-->
<% if milestones.any? -%>
<% milestones.each do |milestone| %>
### <%= milestone %>
<% deprecations.select{|d| d["removal_milestone"] == milestone}.each do |deprecation| %>
#### <%= deprecation["name"] %>
<%= deprecation["body"]%>
<% end %>
<% end %>
<% else -%>
## There are no deprecated features for this version of GitLab
<% end -%>
# This is a template for a feature deprecation
# A deprecation typically occurs when a feature or capability is planned to be removed in a future release.
# Deprecations should be announced at least two releases prior to removal. Any breaking changes should only be done in major releases.
#
# Below is an example of what a single entry should look like, it's required attributes,
# and what types we expect those attribute values to be.
#
# For more information please refer to the handbook documentation here:
# {{LINK TBD}}
#
# Please delete this line and above before submitting your merge request.
- name: # The name of the feature to be deprecated
removal_milestone: # XX.YY format - the milestone when this feature is planned to be removed
body: | # Do not modify this line, instead modify the lines below.
<!-- START OF BODY COMMENT
This area supports markdown.
It is recommended to copy and paste the release post entry content here.
You can shorten it if needed, but remember that the entry itself has already been reviewed by Tech Writing so don't feel like you need to reword anything.
Delete this entire comment and replace it with your markdown content.
END OF BODY COMMENT -->
stage: # (optional - may be required in the future) String value of the stage that the feature was created in. e.g., Growth
tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
issue_url: # (optional) This is a link to the deprecation issue in GitLab
documentation_url: # (optional) This is a link to the current documentation page
image_url: # (optional) This is a link to a thumbnail image depicting the feature
video_url: # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
announcement_milestone: # (optional - may be required in the future) XX.YY format - the milestone when this feature was first announced as deprecated
announcement_date: # (optional - may be required in the future) YYYY-MM-DD format - the date of the milestone release when this feature was first announced as deprecated
removal_date: # (optional - may be required in the future) YYYY-MM-DD format - the date of the milestone release when this feature is planned to be removed
......@@ -6,6 +6,7 @@
# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles
extends: readability
message: "Grade level (%s) is high. To lower the score, use shorter sentences and words."
link: https://docs.gitlab.com/ee/development/documentation/testing.html#vale-readability-score
level: suggestion
grade: 8
metrics:
......
......@@ -186,18 +186,11 @@ following these rules:
To override the default behavior, you can
[specify a service alias](#available-settings-for-services).
### Connecting Services
> - [Deployed behind a feature flag](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/11751).
### Connecting services
You can use inter-dependent services with complex jobs, like end-to-end tests where an
external API needs to communicate with its own database.
This behavior is currently behind a
[feature flag](https://docs.gitlab.com/runner/configuration/feature-flags.html),
which you can enable by defining the `FF_NETWORK_PER_BUILD` CI/CD variable
either in the job or globally.
For example, for an end-to-end test for a front-end application that uses an API, and where the API needs a database:
```yaml
......@@ -218,6 +211,9 @@ end-to-end-tests:
- npm test
```
For this solution to work, you must use
[the networking mode that creates a new network for each job](https://docs.gitlab.com/runner/executors/docker.html#create-a-network-for-each-job).
## Passing CI/CD variables to services
You can also pass custom CI/CD [variables](../variables/index.md)
......@@ -345,11 +341,10 @@ The syntax of `command` is similar to [Dockerfile's `CMD`](https://docs.docker.c
## Using `services` with `docker run` (Docker-in-Docker) side-by-side
In addition to letting services talk to each other via `FF_NETWORK_PER_BUILD`,
containers started via `docker run` can also connect to services provided by GitLab.
Containers started with `docker run` can also connect to services provided by GitLab.
This can be useful in case booting the service is expensive or time consuming.
This technique will allow running tests from multiple different client environments,
When booting the service is expensive or time consuming, you can use
this technique to run tests from different client environments,
while only booting up the tested service once.
```yaml
......@@ -369,6 +364,9 @@ access-service:
curlimages/curl:7.74.0 curl "http://tutum-wordpress"
```
For this solution to work, you must use
[the networking mode that creates a new network for each job](https://docs.gitlab.com/runner/executors/docker.html#create-a-network-for-each-job).
## How Docker integration works
Below is a high level overview of the steps performed by Docker during job
......
---
stage: none
group: none
info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-development-guidelines"
description: "View features that are currently deprecated"
---
# Deprecated features by planned removal milestone
<!--
This page is automatically generated from the YAML files in `/data/deprecations` by the rake task
located at `lib/tasks/gitlab/docs/compile_deprecations.rake`.
Do not edit this page directly.
To add a deprecation, use the example.yml file in `/data/deprecations/templates` as a template,
then run `bin/rake gitlab:docs:compile_deprecations`.
-->
## There are no deprecated features for this version of GitLab
......@@ -37,7 +37,7 @@ the [Git commands you need](#update-the-default-branch-name-in-your-repository)
To update the default branch name for an individual [project](../../index.md):
1. Sign in to GitLab as a user with the [Administrator](../../../permissions.md) role.
1. Sign in to GitLab with at least the [Maintainer](../../../permissions.md) role.
1. In the left navigation menu, go to **Settings > Repository**.
1. Expand **Default branch**, and select a new default branch.
1. (Optional) Select the **Auto-close referenced issues on default branch** checkbox to close
......@@ -77,7 +77,7 @@ overrides it.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/221014) in GitLab 13.6.
Administrators of groups and subgroups can configure the default branch name for a group:
Users with at least the Owner role of groups and subgroups can configure the default branch name for a group:
1. Go to the group **Settings > Repository**.
1. Expand **Default initial branch name**.
......@@ -128,8 +128,8 @@ renames a Git repository's (`example`) default branch.
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
```
1. Sign in to GitLab as an [administrator](../../../permissions.md) and follow
the instructions to
1. Sign in to GitLab with at least the [Maintainer](../../../permissions.md)
role and follow the instructions to
[change the default branch for this project](#change-the-default-branch-name-for-a-project).
Select `main` as your new default branch.
1. Protect your new `main` branch as described in the [protected branches documentation](../../protected_branches.md).
......
# frozen_string_literal: true
namespace :gitlab do
namespace :docs do
desc "Generate deprecation list from individual files"
task :compile_deprecations do
require_relative '../../../../tooling/deprecations/docs/renderer'
source_files = Rake::FileList.new("data/deprecations/**/*.yml") do |fl|
fl.exclude(/example\.yml/)
end
deprecations = source_files.map do |file|
YAML.load_file(file)
end
deprecations.sort_by! { |d| -d["removal_milestone"].to_f }
milestones = deprecations.map { |d| d["removal_milestone"].to_f }.uniq
contents = Deprecations::Docs::Renderer
.render(deprecations: deprecations, milestones: milestones)
File.write(
File.expand_path("doc/deprecations/index.md", "#{__dir__}/../../../.."),
contents)
puts "Deprecations compiled to doc/deprecations/index.md"
end
end
end
......@@ -115,14 +115,16 @@ class AutomatedCleanup
last_deploy = deployment.created_at
deployed_at = Time.parse(last_deploy)
if deployed_at < stop_threshold
environment_state = fetch_environment(environment)&.state
stop_environment(environment, deployment) if environment_state && environment_state != 'stopped'
end
if deployed_at < delete_threshold
delete_environment(environment, deployment)
delete_count += 1
break if delete_count > max_delete_count
elsif deployed_at < stop_threshold
environment_state = fetch_environment(environment)&.state
stop_environment(environment, deployment) if environment_state && environment_state != 'stopped'
end
checked_environments << environment.slug
......
# frozen_string_literal: true
require 'erb'
module Deprecations
module Docs
module Renderer
module_function
def render(**variables)
template = File.expand_path("data/deprecations/templates/_deprecation_template.md.erb", "#{__dir__}/../../..")
load_template(template).result_with_hash(variables)
end
def load_template(filename)
ERB.new(File.read(filename), trim_mode: '-')
end
end
end
end
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