Skip to content
Snippets Groups Projects

Issue #3435899: Only update doc pages when merging to default branch

Merged Issue #3435899: Only update doc pages when merging to default branch
All threads resolved!
Merged Jonathan Smith requested to merge issue/gitlab_templates-3435899:3435899-pages-on-merge into main
All threads resolved!
Files
2
+ 5
5
# Testing Merge Requests
## Via variables
## Specifying a Merge Request via form variables
If a project wants to test using a branch/MR of this repository, go to your project's CI/CD settings page and add the variables below. All pipelines in the project will use the specified repository+branch until the variables are removed.
- KEY = `_GITLAB_TEMPLATES_REPO` VALUE = `issue/gitlab_templates-nnnnnnn`
- KEY = `_GITLAB_TEMPLATES_REF` VALUE = `branch name`, often the format is `nnnnnnn-some-text`
If your MR is testing assets provided by the fork (like modifications to the `.cspell.json` or `phpcs.xml.dist` file, or the `symlink_project.php` file), you might need to set up two additional variables: `_CURL_TEMPLATES_REF` and `_CURL_TEMPLATES_REPO`. This is only needed if you are modified the `project` and `ref` value directly in the `.gitlab-ci.yml` file.
If the MR is testing assets provided by the fork (like modifications to the `.cspell.json` or `phpcs.xml.dist` file, or the `symlink_project.php` file), you might need to set up two additional variables: `_CURL_TEMPLATES_REF` and `_CURL_TEMPLATES_REPO`. This is only needed if you have already modified the `project` and `ref` values directly in your projects `.gitlab-ci.yml` file.
The variables should have the following attributes:
@@ -17,9 +17,9 @@ The variables should have the following attributes:
- Masked = No
- Expanded = Yes
## Alternative MR testing
## Specifying a Merge Request in the .gitlab-ci.yml file
You can also quickly test a Merge Request by changing these two lines:
You can also test a Merge Request by changing these two lines in your `.gitlab-ci.yml` file:
```
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
@@ -32,4 +32,4 @@ to
```
where you set the fork name (`issue/gitlab_templates-12345`) and the branch name (`12345-branch-name`) in the `project` and `ref` entries.
Note that in this case, you might still need to set `_CURL_TEMPLATES_REF` and `_CURL_TEMPLATES_REPO` as explained above.
You might also need to set `_CURL_TEMPLATES_REF` and `_CURL_TEMPLATES_REPO` to the same values, as explained above.
Loading