Skip to content

Commit

Permalink
Merge pull request #79 from palladiumkenya/maven_deploy_cicd
Browse files Browse the repository at this point in the history
Create maven_deploy_cicd.yml
  • Loading branch information
RAJABIBRAZ authored Jan 4, 2024
2 parents 03063c5 + a8863db commit 842883f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 6 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/maven_deploy_cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Publish to Nexus

on:
# Manually triggered workflow using the "Run workflow" button
workflow_dispatch:
push:
branches: [ master ]

jobs:
publish:
runs-on: ubuntu-latest

#set up the build enviroment
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'

- name: Build with Maven
run: mvn -B package -DskipTests

- name: Set settings.xml
uses: s4u/[email protected]
with:
servers: |
[{
"id": "mks-repo",
"username": "${{ secrets.MAVEN_USERNAME }}",
"password": "${{ secrets.MAVEN_TOKEN }}"
},
{
"id": "mks-repo-snapshots",
"username": "${{ secrets.MAVEN_USERNAME }}",
"password": "${{ secrets.MAVEN_TOKEN }}"
}]
- name: Publish
run: mvn --batch-mode clean deploy -DskipTests
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
<reportingVersion>1.18.0</reportingVersion>
<serializationxstreamVersion>0.2.14</serializationxstreamVersion>
<uiframeworkVersion>3.15.0</uiframeworkVersion>
<kenyaemrVersion>18.0.0</kenyaemrVersion>
<kenyacoreVersion>3.0.0</kenyacoreVersion>
<kenyaemrVersion>18.7.0</kenyaemrVersion>
<kenyacoreVersion>3.0.1</kenyacoreVersion>
<kenyauiVersion>3.0.0</kenyauiVersion>
<hivtestingservicesVersion>1.2.0</hivtestingservicesVersion>
<hivtestingservicesVersion>1.5.0</hivtestingservicesVersion>

<jodaTimeVersion>2.9.1</jodaTimeVersion>
<jacksonVersion>2.13.1</jacksonVersion>
Expand Down Expand Up @@ -399,20 +399,20 @@
<repository>
<id>openmrs-repo</id>
<name>OpenMRS Nexus Repository</name>
<url>http://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
<url>https://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
</repository>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<url>https://repo1.maven.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>openmrs-repo</id>
<name>OpenMRS Nexus Repository</name>
<url>http://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
<url>https://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
Expand Down

0 comments on commit 842883f

Please sign in to comment.