Skip to content

Commit 35602da

Browse files
authored
REPORT-912: Added Bamboo specs. (#264)
1 parent 2c8e57e commit 35602da

File tree

1 file changed

+247
-0
lines changed

1 file changed

+247
-0
lines changed

bamboo-specs/bamboo.yml

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
---
2+
version: 2
3+
plan:
4+
project-key: REP
5+
key: REP
6+
name: Reporting Module
7+
description: More details of the release in https://wiki.openmrs.org/x/i4DTAw
8+
stages:
9+
- Build and Test:
10+
manual: false
11+
final: false
12+
jobs:
13+
- Build and Test JDK 8
14+
- Build and Test JDK 17
15+
- Build and Test JDK 11
16+
- Build and Test JDK 24
17+
- Build and Test JDK 21
18+
- Deploy:
19+
manual: false
20+
final: false
21+
jobs:
22+
- Deploy to Maven
23+
- Release:
24+
manual: true
25+
final: false
26+
jobs:
27+
- Release to Maven
28+
Build and Test JDK 8:
29+
key: BTJ8
30+
tasks:
31+
- checkout:
32+
force-clean-build: 'false'
33+
description: Checkout default repository
34+
- script:
35+
interpreter: SHELL
36+
scripts:
37+
- |-
38+
#!/bin/bash -eu
39+
40+
set -x
41+
42+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-8 bash -c 'mvn clean package && chmod -R 777 .'
43+
description: Build and test
44+
artifact-subscriptions: []
45+
Build and Test JDK 17:
46+
key: BTJ17
47+
tasks:
48+
- checkout:
49+
force-clean-build: 'false'
50+
description: Checkout default repository
51+
- script:
52+
interpreter: SHELL
53+
scripts:
54+
- |-
55+
#!/bin/bash -eu
56+
57+
set -x
58+
59+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-17 bash -c 'mvn clean package && chmod -R 777 .'
60+
description: Build and test
61+
artifact-subscriptions: []
62+
Build and Test JDK 11:
63+
key: BTJ11
64+
tasks:
65+
- checkout:
66+
force-clean-build: 'false'
67+
description: Checkout default repository
68+
- script:
69+
interpreter: SHELL
70+
scripts:
71+
- |-
72+
#!/bin/bash -eu
73+
74+
set -x
75+
76+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-11 bash -c 'mvn clean package && chmod -R 777 .'
77+
description: Build and test
78+
artifact-subscriptions: []
79+
Build and Test JDK 24:
80+
key: BTJ24
81+
tasks:
82+
- checkout:
83+
force-clean-build: 'false'
84+
description: Checkout default repository
85+
- script:
86+
interpreter: SHELL
87+
scripts:
88+
- |-
89+
#!/bin/bash -eu
90+
91+
set -x
92+
93+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-24 bash -c 'mvn clean package && chmod -R 777 .'
94+
description: Build and test
95+
artifact-subscriptions: []
96+
Build and Test JDK 21:
97+
key: BTJ21
98+
tasks:
99+
- checkout:
100+
force-clean-build: 'false'
101+
description: Checkout default repository
102+
- script:
103+
interpreter: SHELL
104+
scripts:
105+
- |-
106+
#!/bin/bash -eu
107+
108+
set -x
109+
110+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-21 bash -c 'mvn clean package && chmod -R 777 .'
111+
description: Build and test
112+
artifact-subscriptions: []
113+
Deploy to Maven:
114+
key: DTM
115+
tasks:
116+
- checkout:
117+
force-clean-build: 'false'
118+
description: Checkout default repository
119+
- script:
120+
interpreter: SHELL
121+
scripts:
122+
- |-
123+
#!/bin/bash -eu
124+
125+
set -x
126+
127+
docker pull ${bamboo.build.docker.image.id}
128+
129+
docker run -v m2-repo:/root/.m2/repository -v ~/.m2/settings.xml:/.m2/settings.xml:ro -v ${PWD}:/module --rm -w="/module" ${bamboo.build.docker.image.id} bash -c 'mvn deploy -DskipTests --settings /.m2/settings.xml'
130+
description: Deploy
131+
artifact-subscriptions: []
132+
Release to Maven:
133+
key: RTMVN
134+
tasks:
135+
- checkout:
136+
repository: Git
137+
path: release-scripts
138+
force-clean-build: 'false'
139+
description: Checkout Default Repository
140+
- script:
141+
interpreter: SHELL
142+
scripts:
143+
- |-
144+
#!/bin/bash -eu
145+
146+
set -x
147+
148+
docker pull ${bamboo.build.docker.image.id}
149+
150+
docker run \
151+
-v m2-repo:/root/.m2/repository \
152+
-v ~/.m2/settings.xml:/root/.m2/settings.xml:ro \
153+
-v ${PWD}:/module \
154+
-v ~/.ssh/github:/root/.ssh:ro \
155+
-e GIT_USER_NAME=$GIT_USER_NAME \
156+
-e GIT_USER_EMAIL=$GIT_USER_EMAIL \
157+
-e GIT_SSH_COMMAND='ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
158+
--rm \
159+
-w='/module' \
160+
${bamboo.build.docker.image.id} \
161+
bash -c '
162+
yum -y install git &&
163+
yum clean all &&
164+
git config --global user.email "$GIT_USER_EMAIL" &&
165+
git config --global user.name "$GIT_USER_NAME" &&
166+
git config --global --add safe.directory /module &&
167+
./release-scripts/release-prepare-perform.sh \
168+
-r ${bamboo.maven.release.version} \
169+
-d ${bamboo.maven.development.version} \
170+
-e ${bamboo.planRepository.repositoryUrl}
171+
'
172+
environment: GIT_USER_NAME=${bamboo.git.user.name} GIT_USER_EMAIL=${bamboo.git.user.email}
173+
description: Release prepare perform
174+
- any-task:
175+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
176+
configuration:
177+
variable: maven.release.version
178+
removeSnapshot: 'true'
179+
variableScope: PLAN
180+
description: Save next release version
181+
- any-task:
182+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
183+
configuration:
184+
variable: maven.development.version
185+
variableScope: JOB
186+
description: Retrieve next snaphot version
187+
artifact-subscriptions: []
188+
variables:
189+
build.docker.image.id: maven:3.9.9-amazoncorretto-21
190+
maven.development.version: ''
191+
maven.release.version: 1.29.0
192+
refapp.distro.property: reportingVersion
193+
repositories:
194+
- Git:
195+
type: git
196+
description: A Git Repository
197+
url: https://github.com/openmrs/openmrs-module-reporting.git
198+
branch: master
199+
command-timeout-minutes: '180'
200+
lfs: 'false'
201+
verbose-logs: 'false'
202+
use-shallow-clones: 'true'
203+
cache-on-agents: 'false'
204+
submodules: 'false'
205+
ssh-key-applies-to-submodules: 'false'
206+
fetch-all: 'false'
207+
- Release scripts:
208+
scope: global
209+
triggers:
210+
- polling:
211+
period: '180'
212+
repositories:
213+
- Git
214+
branches:
215+
create: manually
216+
delete: never
217+
link-to-jira: true
218+
notifications:
219+
- events:
220+
- job-failed
221+
recipients:
222+
- committers
223+
- emails:
224+
225+
labels:
226+
- refapp
227+
dependencies:
228+
require-all-stages-passing: false
229+
enabled-for-branches: true
230+
block-strategy: block_if_parent_has_changes
231+
plans:
232+
- REFAPP-OMODDISTRO
233+
- EMRAPI-EMRAPI
234+
- REPREST-REPREST
235+
- REPUI-REPUI
236+
other:
237+
concurrent-build-plugin: system-default
238+
---
239+
version: 2
240+
plan:
241+
key: REP-REP
242+
plan-permissions:
243+
- roles:
244+
- anonymous
245+
permissions:
246+
- view
247+
...

0 commit comments

Comments
 (0)