forked from ConnectForLife/openmrs-module-sms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
46 lines (42 loc) · 1.36 KB
/
bitbucket-pipelines.yml
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
image: maven:3.6.1-jdk-8
definitions:
steps:
- step: &build-step
name: Build the module
caches:
- maven
script:
- mvn clean install
artifacts:
- omod/target/*.omod
pipelines:
default:
- step: *build-step
branches:
master:
- step:
name: Build the module and code analysis
caches:
- maven
script:
- mvn clean install -Pcode-coverage
- mvn sonar:sonar -Dsonar.projectKey=$PIPELINES_SONAR_PROJECT_KEY -Dsonar.host.url=$PIPELINES_SONAR_HOST_URL -Dsonar.login=$PIPELINES_SONAR_TOKEN
artifacts:
- omod/target/*.omod
- step:
name: Push to OpenMRS repository
script:
# clone and checkout the dev branch
- git clone --depth 1 $OPENMRS_REPO_URL repo
- cd repo
- git checkout dev
# replace the module in the repository
- cp ../omod/target/*.omod cfl/web/cfl-modules
# set up git author
- git config --global user.email $PIPELINES_GIT_EMAIL
- git config --global user.name $PIPELINES_GIT_NAME
# commit the new module
- git add .
- git commit -m "Automated SMS module update"
# push to the repository
- git push origin dev