Skip to content

Commit

Permalink
maven deploy cicd fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jecihjoy committed Jan 3, 2024
1 parent a7b4237 commit f6459fe
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 45 deletions.
46 changes: 16 additions & 30 deletions .github/workflows/mekom_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,20 @@ jobs:
- name: Build with Maven
run: mvn -B package -DskipTests


publish:
runs-on: ubuntu-latest
# Define dependencies, this job depends on the completion of the "build" job
needs: build

# Specify conditions for when this job should run
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}

# Set up enviroment for Publish

steps:
#set up the build enviroment
- name: Checkout Repository
uses: actions/checkout@v4
# Step 2: Set up JDK 8 for Publish
- name: Set up JDK 8 for Publish
uses: actions/setup-java@v4
- name: Set settings.xml
uses: s4u/[email protected]
with:
distribution: 'temurin'
java-version: '8'
server-id: mks-nexus
server-username: $MAVEN_USERNAME
server-password: $MAVEN_TOKEN

- name: Publish to Mekom repository
run: mvn -B deploy

env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
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
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>kenyacore</artifactId>
<version>3.0.1</version>
<version>2.8.8</version>
</parent>

<artifactId>kenyacore-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>kenyacore</artifactId>
<version>3.0.1</version>
<version>2.8.8</version>
</parent>

<artifactId>kenyacore-omod</artifactId>
Expand Down
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.openmrs.module</groupId>
<artifactId>kenyacore</artifactId>
<version>3.0.1</version>
<version>2.8.8</version>

<packaging>pom</packaging>
<name>KenyaCore</name>
Expand Down Expand Up @@ -250,16 +250,16 @@
</pluginRepository>
</pluginRepositories>

<distributionManagement>
<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>
<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>
</project>
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>kenyacore</artifactId>
<version>3.0.1</version>
<version>2.8.8</version>
</parent>

<artifactId>kenyacore-test</artifactId>
Expand Down

0 comments on commit f6459fe

Please sign in to comment.