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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
be6f17cf
Commit
be6f17cf
authored
Feb 20, 2018
by
Josef Glatz
Committed by
Achilleas Pipinellis
Apr 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dedicated info about artifacts:untracked to GitLab CI's README.md
parent
ef04186f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
30 deletions
+49
-30
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+49
-30
No files found.
doc/ci/yaml/README.md
View file @
be6f17cf
...
@@ -869,37 +869,29 @@ skip the download step.
...
@@ -869,37 +869,29 @@ skip the download step.
-
Introduced in GitLab Runner v0.7.0 for non-Windows platforms.
-
Introduced in GitLab Runner v0.7.0 for non-Windows platforms.
-
Windows support was added in GitLab Runner v.1.0.0.
-
Windows support was added in GitLab Runner v.1.0.0.
-
From GitLab 9.2, caches are restored before artifacts.
-
From GitLab 9.2, caches are restored before artifacts.
-
Currently not all executors are supported
.
-
Not all executors are
[
supported
](
https://docs.gitlab.com/runner/executors/#compatibility-chart
)
.
-
Job artifacts are only collected for successful jobs by default.
-
Job artifacts are only collected for successful jobs by default.
`artifacts`
is used to specify a list of files and directories which should be
`artifacts`
is used to specify a list of files and directories which should be
attached to the job after success. You can only use paths that are within the
attached to the job after success.
project workspace. To pass artifacts between different jobs, see
[
dependencies
](
#dependencies
)
.
Below are some examples.
Send all files in
`binaries`
and
`.config`
:
The artifacts will be sent to GitLab after the job finishes successfully and will
be available for download in the GitLab UI.
```
yaml
[
Read more about artifacts.
](
../../user/project/pipelines/job_artifacts.md
)
artifacts
:
paths
:
-
binaries/
-
.config
```
Send all Git untracked files:
### `artifacts:paths`
```
yaml
You can only use paths that are within the project workspace. To pass artifacts
artifacts
:
between different jobs, see
[
dependencies
](
#dependencies
)
.
untracked
:
true
```
Send all
Git untracked files and files in
`binaries
`
:
Send all
files in
`binaries`
and
`.config
`
:
```
yaml
```
yaml
artifacts
:
artifacts
:
untracked
:
true
paths
:
paths
:
-
binaries/
-
binaries/
-
.config
```
```
To disable artifact passing, define the job with empty
[
dependencies
](
#dependencies
)
:
To disable artifact passing, define the job with empty
[
dependencies
](
#dependencies
)
:
...
@@ -933,11 +925,6 @@ release-job:
...
@@ -933,11 +925,6 @@ release-job:
-
tags
-
tags
```
```
The artifacts will be sent to GitLab after the job finishes successfully and will
be available for download in the GitLab UI.
[
Read more about artifacts.
](
../../user/project/pipelines/job_artifacts.md
)
### `artifacts:name`
### `artifacts:name`
> Introduced in GitLab 8.6 and GitLab Runner v1.1.0.
> Introduced in GitLab 8.6 and GitLab Runner v1.1.0.
...
@@ -954,26 +941,30 @@ To create an archive with a name of the current job:
...
@@ -954,26 +941,30 @@ To create an archive with a name of the current job:
job
:
job
:
artifacts
:
artifacts
:
name
:
"
$CI_JOB_NAME"
name
:
"
$CI_JOB_NAME"
paths
:
-
binaries/
```
```
To create an archive with a name of the current branch or tag including only
To create an archive with a name of the current branch or tag including only
the
files that are untracked by Git
:
the
binaries directory
:
```
yaml
```
yaml
job
:
job
:
artifacts
:
artifacts
:
name
:
"
$CI_COMMIT_REF_NAME"
name
:
"
$CI_COMMIT_REF_NAME"
untracked
:
true
paths
:
-
binaries/
```
```
To create an archive with a name of the current job and the current branch or
To create an archive with a name of the current job and the current branch or
tag including only the
files that are untracked by Git
:
tag including only the
binaries directory
:
```
yaml
```
yaml
job
:
job
:
artifacts
:
artifacts
:
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
untracked
:
true
paths
:
-
binaries/
```
```
To create an archive with a name of the current
[
stage
](
#stages
)
and branch name:
To create an archive with a name of the current
[
stage
](
#stages
)
and branch name:
...
@@ -982,7 +973,8 @@ To create an archive with a name of the current [stage](#stages) and branch name
...
@@ -982,7 +973,8 @@ To create an archive with a name of the current [stage](#stages) and branch name
job
:
job
:
artifacts
:
artifacts
:
name
:
"
$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
name
:
"
$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
untracked
:
true
paths
:
-
binaries/
```
```
---
---
...
@@ -994,7 +986,8 @@ If you use **Windows Batch** to run your shell scripts you need to replace
...
@@ -994,7 +986,8 @@ If you use **Windows Batch** to run your shell scripts you need to replace
job
:
job
:
artifacts
:
artifacts
:
name
:
"
%CI_JOB_STAGE%-%CI_COMMIT_REF_NAME%"
name
:
"
%CI_JOB_STAGE%-%CI_COMMIT_REF_NAME%"
untracked
:
true
paths
:
-
binaries/
```
```
If you use
**Windows PowerShell**
to run your shell scripts you need to replace
If you use
**Windows PowerShell**
to run your shell scripts you need to replace
...
@@ -1004,7 +997,33 @@ If you use **Windows PowerShell** to run your shell scripts you need to replace
...
@@ -1004,7 +997,33 @@ If you use **Windows PowerShell** to run your shell scripts you need to replace
job
:
job
:
artifacts
:
artifacts
:
name
:
"
$env:CI_JOB_STAGE-$env:CI_COMMIT_REF_NAME"
name
:
"
$env:CI_JOB_STAGE-$env:CI_COMMIT_REF_NAME"
untracked
:
true
paths
:
-
binaries/
```
### `artifacts:untracked`
`artifacts:untracked`
is used to add all Git untracked files as artifacts (along
to the paths defined in
`artifacts:paths`
).
NOTE:
**Note:**
To exclude the folders/files which should not be a part of
`untracked`
just
add them to
`.gitignore`
.
Send all Git untracked files:
```
yaml
artifacts
:
untracked
:
true
```
Send all Git untracked files and files in
`binaries`
:
```
yaml
artifacts
:
untracked
:
true
paths
:
-
binaries/
```
```
### `artifacts:when`
### `artifacts:when`
...
...
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