-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml.archive
118 lines (114 loc) · 3.56 KB
/
bitbucket-pipelines.yml.archive
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# DBNARY Testing on bitbucket
# Prerequisites: pom.xml and appropriate project structure should exist in the repository.
image: maven:3.6.3-adoptopenjdk-14
clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly
definitions:
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
steps:
- step: &build-and-sonar
name: Build
runs-on:
- 'self.hosted'
- 'dbnary'
size: 4x
caches:
- maven
script:
- mvn -B verify --file pom.xml
- mvn -B install -PcodeCoverage
- mvn -B sonar:sonar -Dsonar.java.coveragePlugin=jacoco
artifacts:
- "**/target/site/jacoco/jacoco.xml"
- "**/target/site/jacoco-aggregate/jacoco.xml"
- "**/target/**/*.class"
- step: &build-pr
name: Build pull-request
runs-on:
- 'self.hosted'
- 'dbnary'
size: 2x
caches:
- maven
script:
- chmod +x ./kaiko/cicd/*.sh ./kaiko/extractor/*.sh
- ./kaiko/cicd/cleanup_cache.sh # We don't need maven cache for the dbnary libraries.
- ./kaiko/cicd/compile-pr-and-target-versions.sh
# The previous command checked out another branch that may also have executable rights issues.
- chmod +x ./kaiko/cicd/*.sh ./kaiko/extractor/*.sh
- ./kaiko/cicd/cleanup_cache.sh
artifacts:
- "out/dbnary/**"
- step: &extract_batch_1
name: Extracting batch 1
runs-on:
- 'self.hosted'
- 'dbnary'
size: 4x
script:
- chmod +x ./kaiko/cicd/*.sh ./kaiko/extractor/*.sh
- ./kaiko/cicd/extract_both_versions.sh en
artifacts:
- "target/extracts/**/*.ttl"
- step: &extract_batch_2
name: Extracting batch 2
runs-on:
- 'self.hosted'
- 'dbnary'
size: 4x
script:
- chmod +x ./kaiko/cicd/*.sh ./kaiko/extractor/*.sh
- ./kaiko/cicd/extract_both_versions.sh fr pt it fi ru no la
artifacts:
- "target/extracts/**/*.ttl"
- step: &extract_batch_3
name: Extracting batch 3
runs-on:
- 'self.hosted'
- 'dbnary'
size: 4x
script:
- chmod +x ./kaiko/cicd/*.sh ./kaiko/extractor/*.sh
- ./kaiko/cicd/extract_both_versions.sh de el tr ja es bg pl nl sh sv lt mg id ku
artifacts:
- "target/extracts/**/*.ttl"
- step: &evaluate-pr
name: Summarizing differences in both versions
runs-on:
- 'self.hosted'
- 'dbnary'
size: 4x
script:
- chmod +x ./kaiko/cicd/*.sh ./kaiko/extractor/*.sh
- ./kaiko/cicd/compute_differences.sh
- ./kaiko/cicd/summarize_on_slack.sh
artifacts:
- "target/diffs/*.ttl"
pipelines:
branches:
'*':
- step: *build-and-sonar
'feature/*':
- step: *build-pr
- parallel:
- step: *extract_batch_1
- step: *extract_batch_2
- step: *extract_batch_3
- step: *evaluate-pr
'release/*':
#- step: *build-and-sonar
- step: *build-pr
- parallel:
- step: *extract_batch_1
- step: *extract_batch_2
- step: *extract_batch_3
- step: *evaluate-pr
pull-requests:
"*":
- step: *build-pr
- parallel:
- step: *extract_batch_1
- step: *extract_batch_2
- step: *extract_batch_3
- step: *evaluate-pr