forked from sofastack/sofa-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.master.aci.yml
64 lines (58 loc) · 1.77 KB
/
.master.aci.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
61
62
63
64
stages: # 定义了一条pipeline
- 代码检测 # 定义了stage
- 测试
- 编译
- 发布JAR包
PMD扫描: # 定义了一个job
stage: 代码检测 # 绑定到stage
plugin: PMD # 指定使用的插件
checkRule: # 校验结果
- pmd1 = 0 && pmd2 = 0
STC扫描:
stage: 代码检测
plugin: STC
checkRule:
- stc = 0
单元测试:
stage: 测试
plugin: LINKQ-UT # java单元测试插件
checkRule:
- passRate = 100
pluginConfig:
markdown: admin/result.md # 向页面输出一些自定义内容
集成测试:
stage: 测试
plugin: LINKQ-IT # java集成测试插件
checkRule:
- passRate = 100
tools:
jdk: '1.8'
parameters:
encoding: UTF-8 # 编码设置
pluginConfig:
privateRepo: false, # 是否是私有仓库
parallelCount: 1 # 并发执行个数
enableOracle: false # 是否依赖Oracle
编译:
stage: 编译
plugin: ANT-BUILD # 使用插件ANT-BUILD
pluginConfig:
image: reg.docker.alibaba-inc.com/antb/sofa-build:0.0.2
script:
- export PATH=$PATH:/opt/taobao/java/bin:/opt/taobao/maven/bin
- java -version
- mvn -version
- mvn clean package -Dmaven.test.skip=true -Pdev
发布JAR包:
stage: 发布JAR包
plugin: ANT-BUILD
pluginConfig:
image: reg.docker.alibaba-inc.com/antb/jarbuild:0.0.1
script:
- java -version
- mvn -version
- sed -i '/<mirrors>/,/<\/mirrors>/d' /opt/taobao/maven_settings/settings-release.xml
- sed -i '/<profiles>/,/<\/profiles>/d' /opt/taobao/maven_settings/settings-release.xml
- echo '#############relase'
- cat /opt/taobao/maven_settings/settings-release.xml
- mvn clean deploy -Dmaven.test.skip=true -s /opt/taobao/maven_settings/settings-release.xml -Pdev -Pantcode-release