Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-20 15:08:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-20 15:08:18 +0300
commitd00cd98a2b1b3f0899677f61257821c94cde8e31 (patch)
tree602dc6d5ca71906ff282d87808c0c1d04b853aeb /doc
parentedf0e5b64384499283b406f9087e890ac4fad13f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/pages/index.md21
-rw-r--r--doc/ci/docker/using_docker_build.md16
-rw-r--r--doc/ci/testing/code_quality.md4
-rw-r--r--doc/user/project/pages/introduction.md35
-rw-r--r--doc/user/project/pages/public_folder.md2
5 files changed, 65 insertions, 13 deletions
diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md
index e86726524d0..459a4dcc6a3 100644
--- a/doc/administration/pages/index.md
+++ b/doc/administration/pages/index.md
@@ -590,6 +590,27 @@ gitlab_pages['redirects_max_path_segments'] = 50
gitlab_pages['redirects_max_rule_count'] = 2000
```
+## Use environment variables
+
+You can pass an environment variable to the Pages deamon, for example
+to enable a feature flag.
+
+For example, to enable the configurable directory feature:
+
+1. Edit `/etc/gitlab/gitlab.rb`:
+
+ ```ruby
+ gitlab_pages['env'] = {
+ 'FF_CONFIGURABLE_ROOT_DIR' => "true"
+ }
+ ```
+
+1. Save the file and reconfigure GitLab:
+
+ ```shell
+ sudo gitlab-ctl reconfigure
+ ```
+
## Activate verbose logging for daemon
Follow the steps below to configure verbose logging of GitLab Pages daemon.
diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md
index 004da63476e..b8b2450638e 100644
--- a/doc/ci/docker/using_docker_build.md
+++ b/doc/ci/docker/using_docker_build.md
@@ -352,9 +352,10 @@ Docker-in-Docker is the recommended configuration, but you should be aware of th
To use Docker commands in your CI/CD jobs, you can bind-mount `/var/run/docker.sock` into the
container. Docker is then available in the context of the image.
-> If you bind the Docker socket and you are [using GitLab Runner 11.11 or later](https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1261),
-> you can no longer use `docker:20.10.16-dind` as a service.
-> Volume bindings also affect services, making them incompatible.
+If you bind the Docker socket and you are
+[using GitLab Runner 11.11 or later](https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1261),
+you can no longer use `docker:20.10.16-dind` as a service. Volume bindings also affect services,
+making them incompatible.
To make Docker available in the context of the image, you need to mount
`/var/run/docker.sock` into the launched containers. To do this with the Docker
@@ -390,11 +391,10 @@ sudo gitlab-runner register -n \
--docker-volumes /var/run/docker.sock:/var/run/docker.sock
```
-> If you want to use more complex Docker-in-Docker configurations, like it is necessary to run Code Quality checks with
-> Code Climate, you need to ensure that the paths to the build directory are the same on the host as well as inside the
-> Docker container.
-> See section "[Improve Code Quality performance with private runners](../testing/code_quality.md#improve-code-quality-performance-with-private-runners)"
-> in the Code Quality documentation.
+To use more complex Docker-in-Docker configurations, such as is necessary to run Code Quality checks
+with Code Climate, you need to ensure that the paths to the build directory are the same on the host
+as well as inside the Docker container. For more details, see
+[Improve Code Quality performance with private runners](../testing/code_quality.md#improve-code-quality-performance-with-private-runners).
#### Enable registry mirror for `docker:dind` service
diff --git a/doc/ci/testing/code_quality.md b/doc/ci/testing/code_quality.md
index 5f6af4cb8a9..8fad41f163d 100644
--- a/doc/ci/testing/code_quality.md
+++ b/doc/ci/testing/code_quality.md
@@ -541,8 +541,8 @@ for more details.
### The code cannot be found and the pipeline runs always with default configuration
You are probably using a private runner with the Docker-in-Docker socket-binding configuration.
-You should configure Code Quality checks to run on your worker as documented in section
-"[Improve Code Quality performance with private runners](#improve-code-quality-performance-with-private-runners)".
+You should configure Code Quality checks to run on your worker as documented in
+[Improve Code Quality performance with private runners](#improve-code-quality-performance-with-private-runners)".
### Changing the default configuration has no effect
diff --git a/doc/user/project/pages/introduction.md b/doc/user/project/pages/introduction.md
index 73bfe018a7d..1aef5bd3040 100644
--- a/doc/user/project/pages/introduction.md
+++ b/doc/user/project/pages/introduction.md
@@ -23,8 +23,6 @@ In brief, this is what you need to upload your website in GitLab Pages:
1. Domain of the instance: domain name that is used for GitLab Pages
(ask your administrator).
1. GitLab CI/CD: a `.gitlab-ci.yml` file with a specific job named [`pages`](../../../ci/yaml/index.md#pages) in the root directory of your repository.
-1. A directory called `public` in your site's repository containing the content
- to be published.
1. GitLab Runner enabled for the project.
## GitLab Pages on GitLab.com
@@ -278,6 +276,39 @@ instead. Here are some examples of what happens given the above Pages site:
When `public/data/index.html` exists, it takes priority over the `public/data.html` file
for both the `/data` and `/data/` URL paths.
+## Customize the default folder
+
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/859) in GitLab 16.1 with a Pages flag named `FF_CONFIGURABLE_ROOT_DIR`. Disabled by default.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/1073) in GitLab 16.1.
+
+FLAG:
+On self-managed GitLab, by default this feature is not available. To make it available,
+ask an administrator to [enable the Pages feature flag](../../../administration/pages/index.md#use-environment-variables)
+`FF_CONFIGURABLE_ROOT_DIR="true"`. On GitLab.com, this feature is available.
+
+By default, the [artifact](../../../ci/jobs/job_artifacts.md) folder
+that contains the static files of your site needs to have the name `public`.
+
+To change that folder name to any other value, add a `publish` property to your
+`pages` job configuration in `.gitlab-ci.yml`.
+
+The following example publishes a folder named `dist` instead:
+
+```yaml
+pages:
+ script:
+ - npm run build
+ artifacts:
+ paths:
+ - dist
+ publish: dist
+```
+
+If you're using a folder name other than `public`you must specify
+the directory to be deployed with Pages both as an artifact, and under the
+`publish` property. The reason you need both is that you can define multiple paths
+as artifacts, and GitLab doesn't know which one you want to deploy.
+
## Known issues
For a list of known issues, see the GitLab [public issue tracker](https://gitlab.com/gitlab-org/gitlab/-/issues?label_name[]=Category%3APages).
diff --git a/doc/user/project/pages/public_folder.md b/doc/user/project/pages/public_folder.md
index 6ee8ea17aee..68023b87560 100644
--- a/doc/user/project/pages/public_folder.md
+++ b/doc/user/project/pages/public_folder.md
@@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# GitLab Pages public folder **(FREE)**
-All the files that should be accessible by the browser must be in a root-level folder called `public`.
+> With GitLab 16.1 we introduced the ability to configure the published folder in `.gitlab-ci.yml`, so you longer need to change your framework config. For more information, see how to [set a custom folder to be deployed with Pages](introduction.md#customize-the-default-folder).
Follow these instructions to configure the `public` folder
for the following frameworks.