From 63106d4a3b97c89c841345ffe776d9e5275704bb Mon Sep 17 00:00:00 2001 From: Zoheir CHINE Date: Tue, 10 Oct 2023 18:41:27 +0000 Subject: [PATCH] KH-376: OpenMRS config to be CI validated --- .github/workflows/validate-config.yml | 36 ++++++++++++++++ pom.xml | 60 ++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/validate-config.yml diff --git a/.github/workflows/validate-config.yml b/.github/workflows/validate-config.yml new file mode 100644 index 00000000..3dcb3632 --- /dev/null +++ b/.github/workflows/validate-config.yml @@ -0,0 +1,36 @@ +name: Build and Publish + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '8' + + - name: Set settings.xml + uses: s4u/maven-settings-action@v2.8.0 + with: + servers: | + [{ + "id": "mks-nexus-private", + "username": "${{ secrets.MEKOM_NEXUS_USERNAME }}", + "password": "${{ secrets.MEKOM_NEXUS_PASSWORD }}" + }, + { + "id": "mks-nexus-private-snapshots", + "username": "${{ secrets.MEKOM_NEXUS_USERNAME }}", + "password": "${{ secrets.MEKOM_NEXUS_PASSWORD }}" + }] + - name: Build and validate distro + run: mvn --batch-mode clean install -P validator \ No newline at end of file diff --git a/pom.xml b/pom.xml index 39a03bb9..722cd1a1 100644 --- a/pom.xml +++ b/pom.xml @@ -36,8 +36,55 @@ prod + + validator + + + + maven-antrun-plugin + 1.7 + + + copy-config + pre-integration-test + + + + + + + + + run + + + + + + + org.openmrs.maven.plugins + openmrs-packager-maven-plugin + 1.7.0 + + + validate-configurations + integration-test + + validate-configurations + + + + ${project.build.directory}/configuration + + + + + + + - + com.ozonehis @@ -66,4 +113,15 @@ https://nexus.mekomsolutions.net/repository/maven-snapshots + + + + openmrs-repo + OpenMRS Nexus Repository + https://mavenrepo.openmrs.org/nexus/content/repositories/public + + false + + +