-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
61 lines (55 loc) · 1.22 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
image: gradle:7.5.1-jdk17
default:
tags:
- ci04_ul4
build:
stage: build
script:
- gradle --build-cache build -x test
artifacts:
paths:
- build
- .build-cache
expire_in: 1 days
test:
stage: test
script:
- gradle --build-cache test
variables:
LL_JAVA_TEST_CONNECT: ${LL_JAVA_TEST_CONNECT}
artifacts:
when: always
paths:
- build
- .build-cache
expire_in: 1 days
deploy-snapshot:
stage: deploy
script:
- gradle --build-cache publish -DllnexusUsername=gitlab -DllnexusPassword=$NEXUS_GITLAB_PASSWORD -Pversion=999-SNAPSHOT
artifacts:
paths:
- build
- .build-cache
expire_in: 1 days
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: never
- if: '$CI_COMMIT_TAG =~ /^./'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- when: on_success
deploy-release:
stage: deploy
script:
- gradle --build-cache publish -DllnexusUsername=gitlab -DllnexusPassword=$NEXUS_GITLAB_PASSWORD -Pversion=$CI_COMMIT_TAG
artifacts:
paths:
- build
- .build-cache
expire_in: 1 days
rules:
- if: '$CI_COMMIT_TAG =~ /^[0-9].*/'
when: on_success
- when: never