diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-22 21:06:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-22 21:06:42 +0000 |
commit | d5e0416021aa6de53b89f9d415f368226d9326e5 (patch) | |
tree | 9a3e3bd6d1aac10cfde7f0079f784a489491a48b /doc | |
parent | 24fe7aa2aa199b2aace0cfec26d744f51d7e2167 (diff) | |
download | gitlab-ce-d5e0416021aa6de53b89f9d415f368226d9326e5.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/settings.md | 3 | ||||
-rw-r--r-- | doc/ci/yaml/README.md | 43 | ||||
-rw-r--r-- | doc/user/project/merge_requests/index.md | 5 | ||||
-rw-r--r-- | doc/user/project/merge_requests/merge_when_pipeline_succeeds.md | 5 | ||||
-rw-r--r-- | doc/user/project/push_options.md | 30 |
5 files changed, 84 insertions, 2 deletions
diff --git a/doc/api/settings.md b/doc/api/settings.md index 2d9e435bbb6..c650c31eb41 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -257,7 +257,6 @@ are listed in the descriptions of the relevant settings. | `housekeeping_incremental_repack_period` | integer | required by: `housekeeping_enabled` | Number of Git pushes after which an incremental `git repack` is run. | | `html_emails_enabled` | boolean | no | Enable HTML emails. | | `import_sources` | array of strings | no | Sources to allow project import from, possible values: `github`, `bitbucket`, `bitbucket_server`, `gitlab`, `google_code`, `fogbugz`, `git`, `gitlab_project`, `gitea`, `manifest`, and `phabricator`. | - | `instance_statistics_visibility_private` | boolean | no | When set to `true` Instance statistics will only be available to admins. | | `local_markdown_version` | integer | no | Increase this value when any cached markdown should be invalidated. | | `max_artifacts_size` | integer | no | Maximum artifacts size in MB | @@ -317,6 +316,8 @@ are listed in the descriptions of the relevant settings. | `snowplow_cookie_domain` | string | no | The Snowplow cookie domain. (e.g. `.gitlab.com`) | | `snowplow_enabled` | boolean | no | Enable snowplow tracking. | | `snowplow_site_id` | string | no | The Snowplow site name / application id. (e.g. `gitlab`) | +| `pendo_url` | string | required by: `pendo_enabled` | The Pendo endpoint url with js snippet. (e.g. `https://cdn.pendo.io/agent/static/your-api-key/pendo.js`) | +| `pendo_enabled` | boolean | no | Enable pendo tracking. | | `terminal_max_session_time` | integer | no | Maximum time for web terminal websocket connection (in seconds). Set to `0` for unlimited time. | | `terms` | text | required by: `enforce_terms` | (**Required by:** `enforce_terms`) Markdown content for the ToS. | | `throttle_authenticated_api_enabled` | boolean | no | (**If enabled, requires:** `throttle_authenticated_api_period_in_seconds` and `throttle_authenticated_api_requests_per_period`) Enable authenticated API request rate limit. Helps reduce request volume (e.g. from crawlers or abusive bots). | diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 840cb6b566e..36a2d0c4e01 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -106,7 +106,7 @@ The following table lists available parameters for jobs: | [`when`](#when) | When to run job. Also available: `when:manual` and `when:delayed`. | | [`environment`](#environment) | Name of an environment to which the job deploys. Also available: `environment:name`, `environment:url`, `environment:on_stop`, and `environment:action`. | | [`cache`](#cache) | List of files that should be cached between subsequent runs. Also available: `cache:paths`, `cache:key`, `cache:untracked`, and `cache:policy`. | -| [`artifacts`](#artifacts) | List of files and directories to attach to a job on success. Also available: `artifacts:paths`, `artifacts:name`, `artifacts:untracked`, `artifacts:when`, `artifacts:expire_in`, `artifacts:reports`, and `artifacts:reports:junit`.<br><br>In GitLab [Enterprise Edition](https://about.gitlab.com/pricing/), these are available: `artifacts:reports:codequality`, `artifacts:reports:sast`, `artifacts:reports:dependency_scanning`, `artifacts:reports:container_scanning`, `artifacts:reports:dast`, `artifacts:reports:license_management`, `artifacts:reports:performance` and `artifacts:reports:metrics`. | +| [`artifacts`](#artifacts) | List of files and directories to attach to a job on success. Also available: `artifacts:paths`, `artifacts:expose_as`, `artifacts:name`, `artifacts:untracked`, `artifacts:when`, `artifacts:expire_in`, `artifacts:reports`, and `artifacts:reports:junit`.<br><br>In GitLab [Enterprise Edition](https://about.gitlab.com/pricing/), these are available: `artifacts:reports:codequality`, `artifacts:reports:sast`, `artifacts:reports:dependency_scanning`, `artifacts:reports:container_scanning`, `artifacts:reports:dast`, `artifacts:reports:license_management`, `artifacts:reports:performance` and `artifacts:reports:metrics`. | | [`dependencies`](#dependencies) | Restrict which artifacts are passed to a specific job by providing a list of jobs to fetch artifacts from. | | [`coverage`](#coverage) | Code coverage settings for a given job. | | [`retry`](#retry) | When and how many times a job can be auto-retried in case of a failure. | @@ -1627,6 +1627,47 @@ release-job: - tags ``` +#### `artifacts:expose_as` + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/15018) in GitLab 12.5. + +The `expose_as` keyword can be used to expose [job artifacts](../../user/project/pipelines/job_artifacts.md) +in the [merge request](../../user/project/merge_requests/index.md) UI. + +For example, to match a single file: + +```yml +test: + script: [ 'echo 1' ] + artifacts: + expose_as: 'artifact 1' + paths: ['path/to/file.txt'] +``` + +With this configuration, GitLab will add a link **artifact 1** to the relevant merge request +that points to `file1.txt`. + +An example that will match an entire directory: + +```yml +test: + script: [ 'echo 1' ] + artifacts: + expose_as: 'artifact 1' + paths: ['path/to/directory/'] +``` + +Note the following: + +- A maximum of 10 job artifacts per merge request can be exposed. +- Glob patterns are unsupported. +- If a directory is specified, the link will be to the job [artifacts browser](../../user/project/pipelines/job_artifacts.md#browsing-artifacts) if there is more than + one file in the directory. +- For exposed single file artifacts with `.html`, `.htm`, `.txt`, `.json`, `.xml`, + and `.log` extensions, if [GitLab Pages](../../administration/pages/index.md) is: + - Enabled, GitLab will automatically render the artifact. + - Not enabled, you will see the file in the artifacts browser. + #### `artifacts:name` > Introduced in GitLab 8.6 and GitLab Runner v1.1.0. diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index 2ab7c3fb15b..f673a697c78 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -493,6 +493,11 @@ For more information, [read about pipelines](../../../ci/pipelines.md). Find out about [bulk editing merge requests](../../project/bulk_editing.md). +## Display arbitrary job artifacts + +To configure pipelines to job [artifacts](../pipelines/job_artifacts.md) that can be displayed in +merge requests, see [`artifacts:expose_as`](../../../ci/yaml/README.md#artifactsexpose_as). + ## Troubleshooting Sometimes things don't go as expected in a merge request, here are some diff --git a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md index dab2184448a..6630179ea47 100644 --- a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md +++ b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md @@ -85,3 +85,8 @@ questions that you know someone might ask. Each scenario can be a third-level heading, e.g. `### Getting error message X`. If you have none to add when creating a doc, leave this section in place but commented out to help encourage others to add to it in the future. --> + +## Use it from the command line + +You can use [Push Options](../push_options.md) to trigger this feature when +pushing. diff --git a/doc/user/project/push_options.md b/doc/user/project/push_options.md index 51c46dbd1d4..8952f845b96 100644 --- a/doc/user/project/push_options.md +++ b/doc/user/project/push_options.md @@ -75,3 +75,33 @@ merge request, and target a branch named `my-target-branch`: ```shell git push -o merge_request.create -o merge_request.target=my-target-branch ``` + +Additionally if you want the merge request to merge as soon as the pipeline succeeds you can do: + +```shell +git push -o merge_request.create -o merge_request.target=my-target-branch -o merge_request.merge_when_pipeline_succeeds +``` + +## Useful Git aliases + +As shown above, Git push options can cause Git commands to grow very long. If +you use the same push options frequently, it's useful to create [Git +aliases](https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases). Git aliases +are command line shortcuts for Git which can significantly simplify the use of +long Git commands. + +### Merge when pipeline succeeds alias + +To set up a Git alias for the [merge when pipeline succeeds Git push +option](#push-options-for-merge-requests): + +```shell +git config --global alias.mwps "push -o merge_request.create -o merge_request.target=master -o merge_request.merge_when_pipeline_succeeds" +``` + +Then to quickly push a local branch that will target master and merge when the +pipeline succeeds: + +```shell +git mwps origin <local-branch-name> +``` |