Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven cicd #1779

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/mekom_cicd.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

name: Deploy to Mekom
name: Deploy to Nexus

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

jobs:
build:
Expand All @@ -25,20 +26,24 @@ jobs:

# Build with Maven
- name: Build with Maven
run: mvn -B package
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 == 'workflow_dispatch' }}
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}

# Set up enviroment for Publish

steps:
# Step 1: Set up JDK 8 for Publish
#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
with:
Expand All @@ -48,7 +53,7 @@ jobs:
server-username: $MAVEN_USERNAME
server-password: $MAVEN_TOKEN

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

env:
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -462,15 +462,15 @@
<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>
</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
Loading