-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OZ-342: Build and Deploy to nexus (#5)
- Loading branch information
Showing
7 changed files
with
211 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
npm-debug.log | ||
npm-debug.log | ||
target | ||
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Validate and optionally publish (if pushed on main) | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-publish: | ||
uses: mekomsolutions/mekom-github-workflow-maven/.github/workflows/build-publish-workflow.yml@main | ||
with: | ||
webhook-url: https://openmrs-cd.mekomsolutions.net/generic-webhook-trigger/invoke | ||
secrets: | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
OCD3_USERNAME: ${{ secrets.OCD3_USERNAME }} | ||
OCD3_PASSWORD: ${{ secrets.OCD3_PASSWORD }} | ||
if: ${{ github.ref == 'refs/heads/main' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: 1 | ||
build: | ||
bash_commands: "exit 0" | ||
deploy: | ||
bash_commands: "exit 0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
<project> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.ozonehis</groupId> | ||
<artifactId>maintenance</artifactId> | ||
<name>Ozone maintenance page</name> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<organization> | ||
<name>Ozone HIS</name> | ||
<url>https://www.ozone-his.com</url> | ||
</organization> | ||
<properties> | ||
<outPut.baseDir>${project.build.directory}/${project.artifactId}-${project.version}</outPut.baseDir> | ||
</properties> | ||
<developers> | ||
<developer> | ||
<name>Mekom Solutions</name> | ||
<url>https://www.mekomsolutions.com</url> | ||
</developer> | ||
</developers> | ||
<dependencies> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<version>1.7</version> | ||
<executions> | ||
<!-- copy --> | ||
<execution> | ||
<id>copy-docker-compose</id> | ||
<phase>package</phase> | ||
<configuration> | ||
<target> | ||
<copy tofile="${outPut.baseDir}/docker-compose.yaml"> | ||
<fileset file="${project.basedir}/docker-compose.yaml"/> | ||
</copy> | ||
<copy tofile="${outPut.baseDir}/.env"> | ||
<fileset file="${project.basedir}/.env"/> | ||
</copy> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- packaging the distro as a installable/deployable file --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>package-distro-artifact</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<repositories> | ||
<repository> | ||
<id>mks-nexus-public</id> | ||
<url>https://nexus.mekomsolutions.net/repository/maven-public/</url> | ||
</repository> | ||
<repository> | ||
<id>openmrs-repo</id> | ||
<name>OpenMRS Nexus Repository</name> | ||
<url>https://mavenrepo.openmrs.org/nexus/content/repositories/public</url> | ||
</repository> | ||
<repository> | ||
<id>sonatype-nexus-snapshots</id> | ||
<name>Sonatype Nexus Snapshots</name> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>openmrs-repo</id> | ||
<name>OpenMRS Nexus Repository</name> | ||
<url>https://mavenrepo.openmrs.org/nexus/content/repositories/public</url> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</pluginRepository> | ||
<pluginRepository> | ||
<id>openmrs-snapshots</id> | ||
<name>OpenMRS Public Repository</name> | ||
<url>https://mavenrepo.openmrs.org/snapshots</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
</pluginRepository> | ||
<pluginRepository> | ||
<id>mks-nexus-public</id> | ||
<url>https://nexus.mekomsolutions.net/repository/maven-public/</url> | ||
</pluginRepository> | ||
<pluginRepository> | ||
<id>mks-nexus-snapshots</id> | ||
<url>https://nexus.mekomsolutions.net/repository/maven-snapshots/</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<distributionManagement> | ||
<repository> | ||
<name>Mekom Solutions Nexus repo for releases</name> | ||
<id>mks-nexus-public-releases</id> | ||
<url>https://nexus.mekomsolutions.net/repository/maven-releases</url> | ||
</repository> | ||
<snapshotRepository> | ||
<name>Mekom Solutions Nexus repo for snapshots</name> | ||
<id>mks-nexus-public-snapshots</id> | ||
<url>https://nexus.mekomsolutions.net/repository/maven-snapshots</url> | ||
</snapshotRepository> | ||
</distributionManagement> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<assembly | ||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation=" | ||
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 | ||
http://maven.apache.org/xsd/assembly-1.1.2.xsd" | ||
> | ||
<id>zip-distro-dir</id> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<fileSets> | ||
<fileSet> | ||
<outputDirectory>..</outputDirectory> | ||
<directory>${project.build.directory}/${project.artifactId}-${project.version}</directory> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |