Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2015-11-11 15:44:37 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2015-11-11 15:44:37 +0300
commitfb5c3c70216d7a1151fa4ec767cd034bbb435587 (patch)
treef4858bc2d5671afa0d55f53f349c7609628d8819 /doc
parentdfa09789061bbd3891c17ebbcc23f7bd6b95336c (diff)
parentd70f1f35b13411adf184fafb750ae8d8fb6badea (diff)
Merge branch 'artifacts' into 'master'
Implement Build Artifacts This implements #3028 1. It stores artifacts in shared/artifacts, 1. It adds `artifacts` to `.gitlab-ci.yml`, 1. We use GitLab Workhorse to offload artifacts uploading, 1. To download artifacts it uses GitLab Workhorse X-Sendfile extension, 1. There's one "artifact" per-build. The new upload removes previous one and creates a new one, 1. Default max artifact size is set to 100MB - this can be changed in settings. Missing things: 1. Support for `.gitlab-ci.yml`: `artifacts: true or git-ls-files` which will upload all non tracked files, 1. Artifacts passing between builds. GitLab Workhorse changes: https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/5 GitLab Runner changes: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/46 Syntax: ``` artifacts: untracked: true # default: false paths: # default: empty - bin/files ``` See merge request !1584
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/yaml/README.md30
-rw-r--r--doc/install/installation.md3
-rw-r--r--doc/raketasks/backup_restore.md3
3 files changed, 35 insertions, 1 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index d117a2969be..5d35d1da4ee 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -141,6 +141,7 @@ job_name:
| tags | optional | Defines a list of tags which are used to select runner |
| allow_failure | optional | Allow build to fail. Failed build doesn't contribute to commit status |
| when | optional | Define when to run build. Can be `on_success`, `on_failure` or `always` |
+| artifacts | optional | Define list build artifacts |
### script
`script` is a shell script which is executed by runner. The shell script is prepended with `before_script`.
@@ -258,6 +259,35 @@ The above script will:
1. Execute `cleanup_build` only when the `build` failed,
2. Always execute `cleanup` as the last step in pipeline.
+### artifacts
+`artifacts` is used to specify list of files and directories which should be attached to build after success.
+
+1. Send all files in `binaries` and `.config`:
+```
+artifacts:
+ paths:
+ - binaries/
+ - .config
+```
+
+2. Send all git untracked files:
+```
+artifacts:
+ untracked: true
+```
+
+3. Send all git untracked files and files in `binaries`:
+```
+artifacts:
+ untracked: true
+ paths:
+ - binaries/
+```
+
+The artifacts will be send after the build success to GitLab and will be accessible in GitLab interface to download.
+
+This feature requires GitLab Runner v0.7.0 or higher.
+
## Validate the .gitlab-ci.yml
Each instance of GitLab CI has an embedded debug tool called Lint.
You can find the link to the Lint in the project's settings page or use short url `/lint`.
diff --git a/doc/install/installation.md b/doc/install/installation.md
index f17477a3218..8028e51dbcd 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -246,6 +246,9 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da
# Change the permissions of the directory where CI build traces are stored
sudo chmod -R u+rwX builds/
+ # Change the permissions of the directory where CI artifacts are stored
+ sudo chmod -R u+rwX shared/artifacts/
+
# Copy the example Unicorn config
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md
index 606532a6fbe..1a5442cdac7 100644
--- a/doc/raketasks/backup_restore.md
+++ b/doc/raketasks/backup_restore.md
@@ -29,7 +29,8 @@ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
Also you can choose what should be backed up by adding environment variable SKIP. Available options: db,
-uploads (attachments), repositories, builds(CI build output logs). Use a comma to specify several options at the same time.
+uploads (attachments), repositories, builds(CI build output logs), artifacts (CI build artifacts).
+Use a comma to specify several options at the same time.
```
sudo gitlab-rake gitlab:backup:create SKIP=db,uploads