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

HSC-214: OpenMRS config to be validated on CI #32

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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
release:
types: [published]

jobs:
build:
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main
with:
java-version: "8"
maven-args: "-P validator" # OMRS config validation
secrets:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
8 changes: 4 additions & 4 deletions configs/openmrs/initializer/patientidentifiertypes/voids.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Uuid,Void/Retire,Name,_order:100
81433852-3f10-11e4-adec-0800271c1b75,TRUE,Patient Identifier,
8d793bee-c2cc-11de-8d13-0010c6dffd0f,TRUE,OpenMRS ID,
8d79403a-c2cc-11de-8d13-0010c6dffd0f,TRUE,Old Identification Number,
Uuid,Void/Retire,Name,_order
81433852-3f10-11e4-adec-0800271c1b75,TRUE,Patient Identifier,100
8d793bee-c2cc-11de-8d13-0010c6dffd0f,TRUE,OpenMRS ID,101
8d79403a-c2cc-11de-8d13-0010c6dffd0f,TRUE,Old Identification Number,102
53 changes: 53 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,59 @@
</plugins>
</build>

<profiles>
<profile>
<id>validator</id>
<build>
<plugins>
<!-- copy over merged/packaged OpenMRS config for validation at the integration-test phase -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>Copy OpenMRS Initializer configs for validation</id>
<phase>pre-integration-test</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/validator/configuration">
<fileset
dir="${project.build.directory}/${project.artifactId}-${project.version}/openmrs_config">
<!-- Exclude RelationshipTypes-1.zip -->
<exclude name="**/metadatasharing/RelationshipTypes-1.zip"/>
</fileset>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- hooking the OpenMRS config validation to the integration-test phase -->
<plugin>
<groupId>org.openmrs.maven.plugins</groupId>
<artifactId>openmrs-packager-maven-plugin</artifactId>
<version>1.7.0</version>
<executions>
<execution>
<id>Validate OpenMRS Initializer configs</id>
<phase>integration-test</phase>
<goals>
<goal>validate-configurations</goal>
</goals>
<configuration>
<sourceDir>
${project.build.directory}/validator/configuration</sourceDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>mks-nexus-public</id>
Expand Down
Loading