Commit 305f3131 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 891cbe9f 2cefaaa2
...@@ -409,10 +409,10 @@ Possible response status codes: ...@@ -409,10 +409,10 @@ Possible response status codes:
> - The use of `CI_JOB_TOKEN` in the artifacts download API was [introduced][ee-2346] > - The use of `CI_JOB_TOKEN` in the artifacts download API was [introduced][ee-2346]
> in [GitLab Premium][ee] 9.5. > in [GitLab Premium][ee] 9.5.
Download the artifacts zipped archive from the given reference name and job, Download the artifacts zipped archive from the latest successful pipeline for
provided the job finished successfully. This is the same as the given reference name and job, provided the job finished successfully. This
[getting the job's artifacts](#get-job-artifacts), but by defining the job's is the same as [getting the job's artifacts](#get-job-artifacts), but by
name instead of its ID. defining the job's name instead of its ID.
``` ```
GET /projects/:id/jobs/artifacts/:ref_name/download?job=name GET /projects/:id/jobs/artifacts/:ref_name/download?job=name
...@@ -506,9 +506,9 @@ Possible response status codes: ...@@ -506,9 +506,9 @@ Possible response status codes:
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23538) in GitLab 11.5. > [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23538) in GitLab 11.5.
Download a single artifact file from a specific tag or branch from within the Download a single artifact file for a specific job of the latest successful
job's artifacts archive. The file is extracted from the archive and streamed to pipeline for the given reference name from within the job's artifacts archive.
the client. The file is extracted from the archive and streamed to the client.
``` ```
GET /projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path?job=name GET /projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path?job=name
......
...@@ -193,12 +193,13 @@ You can simply define an image that will be used for all jobs and a list of ...@@ -193,12 +193,13 @@ You can simply define an image that will be used for all jobs and a list of
services that you want to use during build time: services that you want to use during build time:
```yaml ```yaml
image: ruby:2.2 default:
image: ruby:2.2
services: services:
- postgres:9.3 - postgres:9.3
before_script: before_script:
- bundle install - bundle install
test: test:
...@@ -209,7 +210,8 @@ test: ...@@ -209,7 +210,8 @@ test:
It is also possible to define different images and services per job: It is also possible to define different images and services per job:
```yaml ```yaml
before_script: default:
before_script:
- bundle install - bundle install
test:2.1: test:2.1:
...@@ -231,18 +233,19 @@ Or you can pass some [extended configuration options](#extended-docker-configura ...@@ -231,18 +233,19 @@ Or you can pass some [extended configuration options](#extended-docker-configura
for `image` and `services`: for `image` and `services`:
```yaml ```yaml
image: default:
image:
name: ruby:2.2 name: ruby:2.2
entrypoint: ["/bin/bash"] entrypoint: ["/bin/bash"]
services: services:
- name: my-postgres:9.4 - name: my-postgres:9.4
alias: db-postgres alias: db-postgres
entrypoint: ["/usr/local/bin/db-postgres"] entrypoint: ["/usr/local/bin/db-postgres"]
command: ["start"] command: ["start"]
before_script: before_script:
- bundle install - bundle install
test: test:
script: script:
......
...@@ -119,6 +119,35 @@ The following table lists available parameters for jobs: ...@@ -119,6 +119,35 @@ The following table lists available parameters for jobs:
NOTE: **Note:** NOTE: **Note:**
Parameters `types` and `type` are [deprecated](#deprecated-parameters). Parameters `types` and `type` are [deprecated](#deprecated-parameters).
## Setting default parameters
Some parameters can be set globally as the default for all jobs using the
`default:` keyword. Default parameters can then be overridden by job-specific
configuration.
The following job parameters can be defined inside a `default:` block:
- [`image`](#image)
- [`services`](#services)
- [`before_script`](#before_script-and-after_script)
- [`after_script`](#before_script-and-after_script)
- [`cache`](#cache)
In the following example, the `ruby:2.5` image is set as the default for all
jobs except the `rspec 2.6` job, which uses the `ruby:2.6` image:
```yaml
default:
image: ruby:2.5
rspec:
script: bundle exec rspec
rspec 2.6:
image: ruby:2.6
script: bundle exec rspec
```
## Parameter details ## Parameter details
The following are detailed explanations for parameters used to configure CI/CD pipelines. The following are detailed explanations for parameters used to configure CI/CD pipelines.
...@@ -239,7 +268,8 @@ It's possible to overwrite the globally defined `before_script` and `after_scrip ...@@ -239,7 +268,8 @@ It's possible to overwrite the globally defined `before_script` and `after_scrip
if you set it per-job: if you set it per-job:
```yaml ```yaml
before_script: default:
before_script:
- global before script - global before script
job: job:
...@@ -2550,18 +2580,39 @@ You can set it globally or per-job in the [`variables`](#variables) section. ...@@ -2550,18 +2580,39 @@ You can set it globally or per-job in the [`variables`](#variables) section.
The following parameters are deprecated. The following parameters are deprecated.
### `types` ### Globally-defined `types`
CAUTION: **Deprecated:** CAUTION: **Deprecated:**
`types` is deprecated, and could be removed in a future release. `types` is deprecated, and could be removed in a future release.
Use [`stages`](#stages) instead. Use [`stages`](#stages) instead.
### `type` ### Job-defined `type`
CAUTION: **Deprecated:** CAUTION: **Deprecated:**
`type` is deprecated, and could be removed in one of the future releases. `type` is deprecated, and could be removed in one of the future releases.
Use [`stage`](#stage) instead. Use [`stage`](#stage) instead.
### Globally-defined `image`, `services`, `cache`, `before_script`, `after_script`
Defining `image`, `services`, `cache`, `before_script`, and
`after_script` globally is deprecated. Support could be removed
from a future release.
Use [`default:`](#setting-default-parameters) instead. For example:
```yaml
default:
image: ruby:2.5
services:
- docker:dind
cache:
paths: [vendor/]
before_script:
- bundle install --path vendor/
after_script:
- rm -rf tmp/
```
## Custom build directories ## Custom build directories
> [Introduced](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1267) in Gitlab Runner 11.10 > [Introduced](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1267) in Gitlab Runner 11.10
......
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