diff options
Diffstat (limited to 'doc/ci/pipelines.md')
-rw-r--r-- | doc/ci/pipelines.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/ci/pipelines.md b/doc/ci/pipelines.md index a8d785fe184..590a02b306c 100644 --- a/doc/ci/pipelines.md +++ b/doc/ci/pipelines.md @@ -269,6 +269,38 @@ To execute a pipeline manually: The pipeline will execute the jobs as configured. +#### Using a query string + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/24146) in GitLab 12.5. + +Variables on the **Run Pipeline** page can be pre-populated by passing variable keys and values +in a query string appended to the `pipelines/new` URL. The format is: + +```plaintext +.../pipelines/new?ref=<branch>&var[<variable_key>]=<value>&file_var[<file_key>]=<value> +``` + +The following parameters are supported: + +- `ref`: specify the branch to populate the **Run for** field with. +- `var`: specify a `Variable` variable. +- `file_var`: specify a `File` variable. + +For each `var` or `file_var`, a key and value are required. + +For example, the query string +`.../pipelines/new?ref=my_branch&var[foo]=bar&file_var[file_foo]=file_bar` will pre-populate the +**Run Pipeline** page as follows: + +- **Run for** field: `my_branch`. +- **Variables** section: + - Variable: + - Key: `foo` + - Value: `bar` + - File: + - Key: `file_foo` + - Value: `file_bar` + ### Accessing pipelines You can find the current and historical pipeline runs under your project's |