Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
498cb071
Commit
498cb071
authored
Nov 04, 2021
by
Suzanne Selhorn
Committed by
Marcel Amirault
Nov 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-did the dependencies keyword
parent
c3178993
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
27 deletions
+22
-27
doc/ci/yaml/index.md
doc/ci/yaml/index.md
+22
-27
No files found.
doc/ci/yaml/index.md
View file @
498cb071
...
@@ -2755,51 +2755,42 @@ artifacts are restored after [caches](#cache).
...
@@ -2755,51 +2755,42 @@ artifacts are restored after [caches](#cache).
#### `dependencies`
#### `dependencies`
By default, all
`artifacts`
from previous stages
Use the
`dependencies`
keyword to define a list of jobs to fetch artifacts from.
are passed to each job. However, you can use the
`dependencies`
keyword to
You can also set a job to download no artifacts at all.
define a limited list of jobs to fetch artifacts from. You can also set a job to download no artifacts at all.
To use this feature, define
`dependencies`
in context of the job and pass
If you do not use
`dependencies`
, all
`artifacts`
from previous stages are passed to each job.
a list of all previous jobs the artifacts should be downloaded from.
You can define jobs from stages that were executed before the current one.
**Keyword type**
: Job keyword. You can use it only as part of a job.
An error occurs if you define jobs from the current or an upcoming stage.
To prevent a job from downloading artifacts, define an empty array.
When you use
`dependencies`
, the status of the previous job is not considered.
**Possible inputs**
:
If a job fails or it's a manual job that isn't triggered, no error occurs.
The following example defines two jobs with artifacts:
`build:osx`
and
-
The names of jobs to fetch artifacts from.
`build:linux`
. When the
`test:osx`
is executed, the artifacts from
`build:osx`
-
An empty array (
`[]`
), to configure the job to not download any artifacts.
are downloaded and extracted in the context of the build. The same happens
for
`test:linux`
and artifacts from
`build:linux`
.
The job
`deploy`
downloads artifacts from all previous jobs because of
**Example of `dependencies`**
:
the
[
stage
](
#stages
)
precedence:
```
yaml
```
yaml
build
:
osx:
build
osx
:
stage
:
build
stage
:
build
script
:
make build:osx
script
:
make build:osx
artifacts
:
artifacts
:
paths
:
paths
:
-
binaries/
-
binaries/
build
:
linux:
build
linux
:
stage
:
build
stage
:
build
script
:
make build:linux
script
:
make build:linux
artifacts
:
artifacts
:
paths
:
paths
:
-
binaries/
-
binaries/
test
:
osx:
test
osx
:
stage
:
test
stage
:
test
script
:
make test:osx
script
:
make test:osx
dependencies
:
dependencies
:
-
build:osx
-
build:osx
test
:
linux:
test
linux
:
stage
:
test
stage
:
test
script
:
make test:linux
script
:
make test:linux
dependencies
:
dependencies
:
...
@@ -2810,14 +2801,18 @@ deploy:
...
@@ -2810,14 +2801,18 @@ deploy:
script
:
make deploy
script
:
make deploy
```
```
##### When a dependent job fails
In this example, two jobs have artifacts:
`build osx`
and
`build linux`
. When
`test osx`
is executed,
the artifacts from
`build osx`
are downloaded and extracted in the context of the build.
The same thing happens for
`test linux`
and artifacts from
`build linux`
.
> Introduced in GitLab 10.3.
The
`deploy`
job downloads artifacts from all previous jobs because of
the
[
stage
](
#stages
)
precedence.
**Additional details**
:
If the artifacts of the job that is set as a dependency are
-
The job status does not matter. If a job fails or it's a manual job that isn't triggered, no error occurs.
[
expired
](
#artifactsexpire_in
)
or
-
If the artifacts of a dependent job are
[
expired
](
#artifactsexpire_in
)
or
[
deleted
](
../pipelines/job_artifacts.md#delete-job-artifacts
)
, then
[
deleted
](
../pipelines/job_artifacts.md#delete-job-artifacts
)
, then the job fails.
the dependent job fails.
#### `artifacts:exclude`
#### `artifacts:exclude`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment