Skip to content

Commit 666651f

Browse files
authored
LUI-200: Added support for Bamboo Specs. (#217)
* LUI-200: Added support for Bamboo Specs. * Update maven.development.version variable. * LUI-200: Add support to build and test with JDK 8
1 parent e6c0154 commit 666651f

File tree

1 file changed

+367
-0
lines changed

1 file changed

+367
-0
lines changed

bamboo-specs/bamboo.yml

Lines changed: 367 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,367 @@
1+
---
2+
version: 2
3+
plan:
4+
project-key: LU
5+
key: LUL
6+
name: Legacy UI Latest
7+
description: Plan for the LegacyUI module Latest
8+
stages:
9+
- Build and Test:
10+
manual: false
11+
final: false
12+
jobs:
13+
- Build and Test JDK 17
14+
- Build and Test JDK 24
15+
- Build and Test JDK 8
16+
- Build and Test JDK 11
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 17:
29+
key: BTJ17
30+
tasks:
31+
- script:
32+
interpreter: SHELL
33+
scripts:
34+
- |-
35+
#!/bin/bash -eu
36+
37+
set -x
38+
39+
export IMAGE=${bamboo.build.docker.image.id}
40+
41+
docker pull ${IMAGE}
42+
43+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'chmod -R 777 .'
44+
description: Resolve file permissions
45+
- checkout:
46+
force-clean-build: 'true'
47+
description: Checkout default repository
48+
- script:
49+
interpreter: SHELL
50+
scripts:
51+
- |-
52+
#!/bin/bash -eu
53+
54+
set -x
55+
56+
export IMAGE="maven:3.9.9-amazoncorretto-17"
57+
58+
docker pull ${IMAGE}
59+
60+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn clean package && chmod -R 777 .'
61+
description: Build and test
62+
artifact-subscriptions: []
63+
Build and Test JDK 24:
64+
key: BTJ24
65+
tasks:
66+
- script:
67+
interpreter: SHELL
68+
scripts:
69+
- |-
70+
#!/bin/bash -eu
71+
72+
set -x
73+
74+
export IMAGE=${bamboo.build.docker.image.id}
75+
76+
docker pull ${IMAGE}
77+
78+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'chmod -R 777 .'
79+
description: Resolve file permissions
80+
- checkout:
81+
force-clean-build: 'true'
82+
description: Checkout default repository
83+
- script:
84+
interpreter: SHELL
85+
scripts:
86+
- |-
87+
#!/bin/bash -eu
88+
89+
set -x
90+
91+
export IMAGE="maven:3.9.9-amazoncorretto-24"
92+
93+
docker pull ${IMAGE}
94+
95+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn clean package && chmod -R 777 .'
96+
description: Build and test
97+
artifact-subscriptions: []
98+
Build and Test JDK 8:
99+
key: BTJ8
100+
tasks:
101+
- script:
102+
interpreter: SHELL
103+
scripts:
104+
- |-
105+
#!/bin/bash -eu
106+
107+
set -x
108+
109+
export IMAGE=${bamboo.build.docker.image.id}
110+
111+
docker pull ${IMAGE}
112+
113+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'chmod -R 777 .'
114+
description: Resolve file permissions
115+
- checkout:
116+
force-clean-build: 'true'
117+
description: Checkout default repository
118+
- script:
119+
interpreter: SHELL
120+
scripts:
121+
- |-
122+
#!/bin/bash -eu
123+
124+
set -x
125+
126+
export IMAGE="maven:3.9.9-amazoncorretto-8"
127+
128+
docker pull ${IMAGE}
129+
130+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn clean package && chmod -R 777 .'
131+
description: Build and test
132+
artifact-subscriptions: []
133+
Build and Test JDK 11:
134+
key: BTJ11
135+
tasks:
136+
- script:
137+
interpreter: SHELL
138+
scripts:
139+
- |-
140+
#!/bin/bash -eu
141+
142+
set -x
143+
144+
export IMAGE=${bamboo.build.docker.image.id}
145+
146+
docker pull ${IMAGE}
147+
148+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'chmod -R 777 .'
149+
description: Resolve file permissions
150+
- checkout:
151+
force-clean-build: 'true'
152+
description: Checkout default repository
153+
- script:
154+
interpreter: SHELL
155+
scripts:
156+
- |-
157+
#!/bin/bash -eu
158+
159+
set -x
160+
161+
export IMAGE="maven:3.9.9-amazoncorretto-11"
162+
163+
docker pull ${IMAGE}
164+
165+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn clean package && chmod -R 777 .'
166+
description: Build and test
167+
artifact-subscriptions: []
168+
Build and Test JDK 21:
169+
key: BTJ21
170+
tasks:
171+
- script:
172+
interpreter: SHELL
173+
scripts:
174+
- |-
175+
#!/bin/bash -eu
176+
177+
set -x
178+
179+
export IMAGE=${bamboo.build.docker.image.id}
180+
181+
docker pull ${IMAGE}
182+
183+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'chmod -R 777 .'
184+
description: Resolve file permissions
185+
- checkout:
186+
force-clean-build: 'true'
187+
description: Checkout default repository
188+
- script:
189+
interpreter: SHELL
190+
scripts:
191+
- |-
192+
#!/bin/bash -eu
193+
194+
set -x
195+
196+
export IMAGE="maven:3.9.9-amazoncorretto-21"
197+
198+
docker pull ${IMAGE}
199+
200+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn clean package && chmod -R 777 .'
201+
description: Build and test
202+
artifact-subscriptions: []
203+
Deploy to Maven:
204+
key: DTM
205+
tasks:
206+
- script:
207+
interpreter: SHELL
208+
scripts:
209+
- |-
210+
#!/bin/bash -eu
211+
212+
set -x
213+
214+
export IMAGE=${bamboo.build.docker.image.id}
215+
216+
docker pull ${IMAGE}
217+
218+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'chmod -R 777 .'
219+
description: Resolve file permissions
220+
- checkout:
221+
force-clean-build: 'true'
222+
description: Checkout default repository
223+
- script:
224+
interpreter: SHELL
225+
scripts:
226+
- |-
227+
#!/bin/bash -eu
228+
229+
set -x
230+
231+
export IMAGE=${bamboo.build.docker.image.id}
232+
233+
docker pull ${IMAGE}
234+
235+
docker run -v m2-repo:/root/.m2/repository -v ~/.m2/settings.xml:/.m2/settings.xml:ro -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'mvn deploy -DskipTests --settings /.m2/settings.xml'
236+
description: Deploy
237+
artifact-subscriptions: []
238+
Release to maven:
239+
key: RTM
240+
tasks:
241+
- script:
242+
interpreter: SHELL
243+
scripts:
244+
- |-
245+
#!/bin/bash -eu
246+
247+
set -x
248+
249+
export IMAGE=${bamboo.build.docker.image.id}
250+
251+
docker pull ${IMAGE}
252+
253+
docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" ${IMAGE} bash -c 'chmod -R 777 .'
254+
description: Temporarily resolve file permissions
255+
- checkout:
256+
force-clean-build: 'true'
257+
description: Checkout Default Repository
258+
- checkout:
259+
repository: Release scripts
260+
path: release-scripts
261+
force-clean-build: 'true'
262+
description: Checkout Default Repository
263+
- script:
264+
interpreter: SHELL
265+
scripts:
266+
- |-
267+
#!/bin/bash -eu
268+
269+
set -x
270+
271+
export IMAGE=${bamboo.build.docker.image.id}
272+
273+
docker pull ${IMAGE}
274+
275+
docker run \
276+
-v m2-repo:/root/.m2/repository \
277+
-v ~/.m2/settings.xml:/root/.m2/settings.xml:ro \
278+
-v ${PWD}:/module \
279+
-v ~/.ssh/github:/root/.ssh:ro \
280+
-e GIT_USER_NAME=$GIT_USER_NAME \
281+
-e GIT_USER_EMAIL=$GIT_USER_EMAIL \
282+
-e GIT_SSH_COMMAND='ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
283+
--rm \
284+
-w='/module' \
285+
${IMAGE} \
286+
bash -c '
287+
yum -y install git &&
288+
yum clean all &&
289+
git config --global user.email "$GIT_USER_EMAIL" &&
290+
git config --global user.name "$GIT_USER_NAME" &&
291+
git config --global --add safe.directory /module &&
292+
./release-scripts/release-prepare-perform.sh \
293+
-r ${bamboo.maven.release.version} \
294+
-d ${bamboo.maven.development.version} \
295+
-e ${bamboo.planRepository.repositoryUrl}
296+
'
297+
environment: GIT_USER_NAME=${bamboo.git.user.name} GIT_USER_EMAIL=${bamboo.git.user.email}
298+
description: Release prepare perform
299+
- any-task:
300+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
301+
configuration:
302+
variable: maven.release.version
303+
removeSnapshot: 'true'
304+
variableScope: PLAN
305+
description: Save next release version
306+
- any-task:
307+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
308+
configuration:
309+
variable: maven.development.version
310+
variableScope: JOB
311+
description: Retrieve next snaphot version
312+
artifact-subscriptions: []
313+
variables:
314+
build.docker.image.id: maven:3.9.9-amazoncorretto-21
315+
maven.development.version: 2.1.0-SNAPSHOT
316+
maven.release.version: 2.0.0
317+
refapp.distro.property: legacyuiVersion
318+
repositories:
319+
- Git:
320+
type: git
321+
url: https://github.com/openmrs/openmrs-module-legacyui.git
322+
branch: master
323+
command-timeout-minutes: '180'
324+
lfs: 'false'
325+
verbose-logs: 'true'
326+
use-shallow-clones: 'false'
327+
cache-on-agents: 'false'
328+
submodules: 'false'
329+
ssh-key-applies-to-submodules: 'false'
330+
fetch-all: 'false'
331+
- Release scripts:
332+
scope: global
333+
triggers:
334+
- polling:
335+
period: '180'
336+
repositories:
337+
- Git
338+
branches:
339+
create: manually
340+
delete: never
341+
link-to-jira: true
342+
notifications:
343+
- events:
344+
- job-failed
345+
recipients:
346+
- committers
347+
- emails:
348+
- dev-refapp@openmrs.org
349+
labels:
350+
- refapp
351+
dependencies:
352+
require-all-stages-passing: false
353+
enabled-for-branches: true
354+
block-strategy: none
355+
plans: []
356+
other:
357+
concurrent-build-plugin: system-default
358+
---
359+
version: 2
360+
plan:
361+
key: LU-LUL
362+
plan-permissions:
363+
- roles:
364+
- anonymous
365+
permissions:
366+
- view
367+
...

0 commit comments

Comments
 (0)