Skip to content

Commit

Permalink
Merge pull request Bahmni#27 from jecihjoy/module-deploy
Browse files Browse the repository at this point in the history
Add module deploy workflow to cicd pipeline
  • Loading branch information
RAJABIBRAZ authored Jan 4, 2024
2 parents 0e6e8b9 + 448b405 commit a42c990
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 8 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: [ openmrs-3x ]

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
18 changes: 10 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,16 @@
</pluginRepositories>

<distributionManagement>
<snapshotRepository>
<id>nexus-sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>nexus-sonatype</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<repository>
<id>mks-repo</id>
<name>Mekom Solutions Nexus Releases</name>
<url>https://nexus.mekomsolutions.net/repository/maven-releases</url>
</repository>
<snapshotRepository>
<id>mks-repo-snapshots</id>
<name>Mekom Solutions Nexus Snapshots</name>
<url>https://nexus.mekomsolutions.net/repository/maven-snapshots</url>
</snapshotRepository>
</distributionManagement>

<profiles>
Expand Down

0 comments on commit a42c990

Please sign in to comment.