Skip to content

Commit 1745833

Browse files
authored
Added Bamboo Specs (#82)
1 parent e714c93 commit 1745833

File tree

1 file changed

+174
-0
lines changed

1 file changed

+174
-0
lines changed

bamboo-specs/bamboo.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
version: 2
3+
plan:
4+
project-key: QM
5+
key: QUEUE
6+
name: Queue Module
7+
description: Main branch of the Queue Module
8+
stages:
9+
- Build and Test:
10+
manual: false
11+
final: false
12+
jobs:
13+
- Build and Test JDK 8
14+
- Deploy:
15+
manual: false
16+
final: false
17+
jobs:
18+
- Deploy to Maven
19+
- Release:
20+
manual: true
21+
final: false
22+
jobs:
23+
- Release to Maven
24+
Build and Test JDK 8:
25+
key: BTJ8
26+
tasks:
27+
- checkout:
28+
force-clean-build: false
29+
description: Checkout default repository
30+
- script:
31+
interpreter: SHELL
32+
scripts:
33+
- |-
34+
#!/bin/bash -eu
35+
36+
set -x
37+
38+
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 -B && chmod -R 777 .'
39+
description: Build and test
40+
artifact-subscriptions: []
41+
Deploy to Maven:
42+
key: DTM
43+
tasks:
44+
- checkout:
45+
force-clean-build: false
46+
description: Checkout default repository
47+
- script:
48+
interpreter: SHELL
49+
scripts:
50+
- |-
51+
#!/bin/bash -eu
52+
53+
set -x
54+
55+
docker pull ${bamboo.build.docker.image.id}
56+
57+
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 -B -DskipTests --settings /.m2/settings.xml'
58+
description: Deploy
59+
artifact-subscriptions: []
60+
Release to Maven:
61+
key: RTM
62+
tasks:
63+
- checkout:
64+
repository: Git
65+
path: release-scripts
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 pull ${bamboo.build.docker.image.id}
77+
78+
docker run \
79+
-v m2-repo:/root/.m2/repository \
80+
-v ~/.m2/settings.xml:/root/.m2/settings.xml:ro \
81+
-v ${PWD}:/module \
82+
-v ~/.ssh/github:/root/.ssh:ro \
83+
-e GIT_USER_NAME=$GIT_USER_NAME \
84+
-e GIT_USER_EMAIL=$GIT_USER_EMAIL \
85+
-e GIT_SSH_COMMAND='ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
86+
--rm \
87+
-w='/module' \
88+
${bamboo.build.docker.image.id} \
89+
bash -c '
90+
yum -y install git &&
91+
yum clean all &&
92+
git config --global user.email "$GIT_USER_EMAIL" &&
93+
git config --global user.name "$GIT_USER_NAME" &&
94+
git config --global --add safe.directory /module &&
95+
./release-scripts/release-prepare-perform.sh \
96+
-r ${bamboo.maven.release.version} \
97+
-d ${bamboo.maven.development.version} \
98+
-e ${bamboo.planRepository.repositoryUrl}
99+
'
100+
environment: GIT_USER_NAME=${bamboo.git.user.name} GIT_USER_EMAIL=${bamboo.git.user.email}
101+
description: Release prepare perform
102+
- any-task:
103+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
104+
configuration:
105+
variable: maven.release.version
106+
removeSnapshot: 'true'
107+
variableScope: PLAN
108+
description: Save next release version
109+
- any-task:
110+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
111+
configuration:
112+
variable: maven.development.version
113+
variableScope: JOB
114+
description: Retrieve next snaphot version
115+
artifact-subscriptions: []
116+
variables:
117+
build.docker.image.id: maven:3.9.9-amazoncorretto-8
118+
maven.development.version: 2.8.0-SNAPSHOT
119+
maven.release.version: 2.7.0
120+
repositories:
121+
- Git:
122+
type: git
123+
url: https://github.com/openmrs/openmrs-module-queue
124+
branch: main
125+
command-timeout-minutes: '180'
126+
lfs: false
127+
verbose-logs: false
128+
use-shallow-clones: true
129+
cache-on-agents: false
130+
submodules: false
131+
submodules-use-shallow-clones: false
132+
ssh-key-applies-to-submodules: false
133+
fetch-all: false
134+
- Release scripts:
135+
scope: global
136+
triggers:
137+
- polling:
138+
period: '180'
139+
repositories:
140+
- Git
141+
branches:
142+
create: manually
143+
delete: never
144+
link-to-jira: true
145+
notifications:
146+
- events:
147+
- plan-completed
148+
recipients:
149+
- emails:
150+
- dev-refapp@openmrs.org
151+
- events:
152+
- plan-failed
153+
recipients:
154+
- committers
155+
labels: []
156+
dependencies:
157+
require-all-stages-passing: false
158+
enabled-for-branches: true
159+
block-strategy: none
160+
plans: []
161+
other:
162+
concurrent-build-plugin:
163+
number-of-concurrent-builds: system-default
164+
execution-strategy: block-triggering
165+
---
166+
version: 2
167+
plan:
168+
key: QM-QUEUE
169+
plan-permissions:
170+
- roles:
171+
- anonymous
172+
permissions:
173+
- view
174+
...

0 commit comments

Comments
 (0)