Merge branch 'patch-1' into 'master'
Add example of creating build artifacts only for release tags. See merge request !2649
This commit is contained in:
commit
b352dbaba6
1 changed files with 24 additions and 2 deletions
|
@ -428,8 +428,30 @@ artifacts:
|
||||||
- binaries/
|
- binaries/
|
||||||
```
|
```
|
||||||
|
|
||||||
The artifacts will be send after a successful build success to GitLab, and will
|
You may want to create artifacts only for tagged releases to avoid filling the
|
||||||
be accessible in the GitLab UI to download.
|
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
|
### cache
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue