Skip to content

Commit 1961104

Browse files
authored
Added Bamboo Specs (#321)
* Added Bamboo Specs * Updated release and development versions
1 parent ddbbd83 commit 1961104

File tree

1 file changed

+182
-0
lines changed

1 file changed

+182
-0
lines changed

bamboo-specs/bamboo.yml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
version: 2
3+
plan:
4+
project-key: HTML
5+
key: HFE5
6+
name: HTML Form Entry
7+
description: Master branch of HFE
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'
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+
force-clean-build: false
65+
description: Checkout Default Repository
66+
- checkout:
67+
repository: Git
68+
path: release-scripts
69+
force-clean-build: false
70+
description: Checkout Release Scripts Repository
71+
- script:
72+
interpreter: SHELL
73+
scripts:
74+
- |-
75+
#!/bin/bash -eu
76+
77+
set -x
78+
79+
docker pull ${bamboo.build.docker.image.id}
80+
81+
docker run \
82+
-v m2-repo:/root/.m2/repository \
83+
-v ~/.m2/settings.xml:/root/.m2/settings.xml:ro \
84+
-v ${PWD}:/module \
85+
-v ~/.ssh/github:/root/.ssh:ro \
86+
-e GIT_USER_NAME=$GIT_USER_NAME \
87+
-e GIT_USER_EMAIL=$GIT_USER_EMAIL \
88+
-e GIT_SSH_COMMAND='ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
89+
--rm \
90+
-w='/module' \
91+
${bamboo.build.docker.image.id} \
92+
bash -c '
93+
yum -y install git &&
94+
yum clean all &&
95+
git config --global user.email "$GIT_USER_EMAIL" &&
96+
git config --global user.name "$GIT_USER_NAME" &&
97+
git config --global --add safe.directory /module &&
98+
./release-scripts/release-prepare-perform.sh \
99+
-r ${bamboo.maven.release.version} \
100+
-d ${bamboo.maven.development.version} \
101+
-e ${bamboo.planRepository.repositoryUrl}
102+
'
103+
environment: GIT_USER_NAME=${bamboo.git.user.name} GIT_USER_EMAIL=${bamboo.git.user.email}
104+
description: Release prepare perform
105+
- any-task:
106+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
107+
configuration:
108+
variable: maven.release.version
109+
removeSnapshot: 'true'
110+
variableScope: PLAN
111+
description: Save next release version
112+
- any-task:
113+
plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor
114+
configuration:
115+
variable: maven.development.version
116+
variableScope: JOB
117+
description: Retrieve next snaphot version
118+
- command:
119+
executable: Bash
120+
argument: release-scripts/distro-update.sh -r "${bamboo.maven.release.version}" -d "${bamboo.maven.development.version}" -p "${bamboo.refapp.distro.property}" -s "${bamboo.refapp.distro.scm}" -b "${bamboo.refapp.distro.dev.branch}" -n "${bamboo.preparing.refapp.distro.release}"
121+
environment: MAVEN_HOME="${bamboo.capability.system.builder.mvn3.Maven 3}"
122+
description: Update distro with the new version
123+
artifact-subscriptions: []
124+
variables:
125+
build.docker.image.id: maven:3.9.9-amazoncorretto-8
126+
maven.development.version: 6.1.0-SNAPSHOT
127+
maven.release.version: 6.0.0
128+
refapp.distro.property: htmlformentryVersion
129+
repositories:
130+
- Git:
131+
type: git
132+
description: A Git Repository
133+
url: https://github.com/openmrs/openmrs-module-htmlformentry.git
134+
branch: master
135+
command-timeout-minutes: '180'
136+
lfs: false
137+
verbose-logs: false
138+
use-shallow-clones: true
139+
cache-on-agents: false
140+
submodules: false
141+
submodules-use-shallow-clones: false
142+
ssh-key-applies-to-submodules: false
143+
fetch-all: false
144+
- Release scripts:
145+
scope: global
146+
triggers:
147+
- polling:
148+
period: '180'
149+
repositories:
150+
- Git
151+
branches:
152+
create: manually
153+
delete: never
154+
link-to-jira: true
155+
notifications:
156+
- events:
157+
- job-failed
158+
recipients:
159+
- committers
160+
- emails:
161+
162+
labels:
163+
- refapp
164+
dependencies:
165+
require-all-stages-passing: false
166+
enabled-for-branches: true
167+
block-strategy: none
168+
plans: []
169+
other:
170+
concurrent-build-plugin:
171+
number-of-concurrent-builds: system-default
172+
execution-strategy: block-triggering
173+
---
174+
version: 2
175+
plan:
176+
key: HTML-HFE5
177+
plan-permissions:
178+
- roles:
179+
- anonymous
180+
permissions:
181+
- view
182+
...

0 commit comments

Comments
 (0)