-
Notifications
You must be signed in to change notification settings - Fork 64
/
.gitlab-ci.yml
51 lines (44 loc) · 1.48 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
image: registry.cn-shanghai.aliyuncs.com/c7n/cibase:0.9.1
stages:
- mvn-package
- maven-deploy
maven-test-branches:
stage: mvn-package
script:
- mvn package source:jar-no-fork -DskipTests=true
only:
- branches
except:
- master
- tags
- /^release-.*$/
- /^hotfix-.*$/
#maven-test-build:
# stage: mvn-package
# script:
# - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.gitlab.project_id=$CI_PROJECT_PATH -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.analysis.serviceGroup=$GROUP_NAME -Dsonar.analysis.commitId=$CI_COMMIT_SHA -Dsonar.projectKey=$GROUP_NAME:$PROJECT_NAME -Dsonar.gitlab.query_max_retry=200 -U
# only:
# - master
# - /^release-.*$/
# - /^hotfix-.*$/
maven-deploy-snapshot:
stage: maven-deploy
script:
- mvn clean install -DskipTests=true deploy -DaltDeploymentRepository=${CHOERODON_SNAPSHOT_ID}::default::${CHOERODON_SNAPSHOT_URL}
only:
- master
maven-deploy-release:
stage: maven-deploy
script:
- mvn clean install -DskipTests=true deploy -DaltDeploymentRepository=${CHOERODON_REPOSITORY_ID}::default::${CHOERODON_RELEASE_URL}
only:
# - master
- tags
- /^hotfix-.*$/
- /^release-.*$/
.auto_devops: &auto_devops |
curl -o .auto_devops.sh \
"${CHOERODON_URL}/devops/ci?token=${Token}&type=lib"
source .auto_devops.sh
before_script:
- *auto_devops