Skip to content

Commit

Permalink
BAH-1386 | Refactor build publish workflow to deploy it in nexus
Browse files Browse the repository at this point in the history
Co-authored-by: Abinaya U <[email protected]>
Co-authored-by: Arjun G <[email protected]>
Co-authored-by: Kavitha S <[email protected]>
Co-authored-by: MOHANKUMAR T <[email protected]>
Co-authored-by: Umair Fayaz <[email protected]>
  • Loading branch information
6 people committed Mar 2, 2022
1 parent 0e24cb3 commit 72b09d3
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 48 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build_deploy.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Publish package
on:
push:
branches: [ master ]

jobs:
build-publish-package:
name: Build and Publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: nexus-sonatype
server-username: NEXUS_USERNAME
server-password: NEXUS_PASSWORD
- name: Build and deploy with Maven
run: mvn --no-transfer-progress clean -U deploy
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
24 changes: 12 additions & 12 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Validate PR

on:
pull_request:
branches:
- master
branches:
- master

jobs:
build-test-package:
name: Build and Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build and test with Maven
run: |
mvn clean install
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Build and Package with Maven
run: mvn --no-transfer-progress clean -U install
23 changes: 13 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,29 @@

<profiles>
<profile>
<id>mybahmni-s3</id>
<id>nexus-sonatype</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<distributionManagement>
<snapshotRepository>
<id>repo.mybahmni.org</id>
<name>bahmni-artifactory-snapshots</name>
<url>s3://repo.mybahmni.org/artifactory/snapshot</url>
<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>
</distributionManagement>
</profile>
<profile>
<id>github</id>
<id>mybahmni-s3</id>
<distributionManagement>
<repository>
<id>github</id>
<name>openmrs-module-episodes-snapshot</name>
<url>https://maven.pkg.github.com/Bahmni/openmrs-module-episodes</url>
</repository>
<snapshotRepository>
<id>repo.mybahmni.org</id>
<name>bahmni-artifactory-snapshots</name>
<url>s3://repo.mybahmni.org/artifactory/snapshot</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
Expand Down

0 comments on commit 72b09d3

Please sign in to comment.