diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-02-18 12:24:54 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-18 15:14:23 +0100 |
commit | f762b63214c8a381bcb3a331094c56e44285e642 (patch) | |
tree | 2c39a290f7099f6ea1c83a2210cab90f1e86d214 | |
parent | 03a156224b2a732325d662a78d0f5b19ec73ae98 (diff) | |
download | gitlab-ce-f762b63214c8a381bcb3a331094c56e44285e642.tar.gz |
Merge branch 'patch-1' into 'master'
Add example of creating build artifacts only for release tags.
See merge request !2649
-rw-r--r-- | doc/ci/yaml/README.md | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 194c8171bb9..461a545c474 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -428,8 +428,30 @@ artifacts: - binaries/ ``` -The artifacts will be send after a successful build success to GitLab, and will -be accessible in the GitLab UI to download. +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 sent to GitLab after a successful build and will +be available for download in the GitLab UI. ### cache |