summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMart Sõmermaa <mart.somermaa@gmail.com>2016-01-29 10:44:25 +0000
committerMart Somermaa <mart.somermaa@cgi.com>2016-02-03 12:39:34 +0200
commitd04556009c9cb42420de45ad99ce342b38865456 (patch)
treef394528b4eafe1fafdb1f628d4c78613f05994ea /doc
parentf5860ce6466bf8934bc01254351bffd005dfeafe (diff)
downloadgitlab-ce-d04556009c9cb42420de45ad99ce342b38865456.tar.gz
Add example of creating build artifacts only for release tags.
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/yaml/README.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 4d280297dbb..d5f18831c18 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -424,6 +424,28 @@ artifacts:
- binaries/
```
+You may want to create artifacts only for tagged releases to avoid filling the
+build server storage with temporary build artifacts.
+
+Create artifacts only for tags (`default-job` will not create artifacts):
+
+```yaml
+default-job:
+ script:
+ - mvn test -U
+ except:
+ - tags
+
+release-job:
+ script:
+ - mvn package -U
+ artifacts:
+ paths:
+ - target/*.war
+ only:
+ - tags
+```
+
The artifacts will be send after a successful build success to GitLab, and will
be accessible in the GitLab UI to download.