From 541a29a0c6ba4dd0dbe06ca4f0d7666f9e1515c8 Mon Sep 17 00:00:00 2001 From: Aras Date: Thu, 18 Sep 2025 10:35:21 -0400 Subject: [PATCH 1/3] IKDT-1177 repo deployment changes --- loinc-export/pom.xml | 191 ++++------ loinc-origin/pom.xml | 338 +++++++----------- loinc-pipeline/pom.xml | 30 +- loinc-starterdata/pom.xml | 11 +- plugin/loinc-starterdata-maven-plugin/pom.xml | 1 - .../loinc-transformation-maven-plugin/pom.xml | 1 - pom.xml | 32 +- 7 files changed, 262 insertions(+), 342 deletions(-) diff --git a/loinc-export/pom.xml b/loinc-export/pom.xml index e1bc7b9..96ba561 100644 --- a/loinc-export/pom.xml +++ b/loinc-export/pom.xml @@ -7,7 +7,9 @@ 1.0.0-SNAPSHOT - loinc-export + dev.ikm.data.loinc + loinc + ${revision} pom loinc-export @@ -16,167 +18,98 @@ - dev.ikm.tinkar.data - loinc - ${data-artifact.path-prefix} - ${source.version}-1.0.0 - ${project.artifactId}-${project.version} - ${project.build.directory}/${data-artifact.prefix} - https://nexus.tinkarbuild.com/repository/private-assets/ - false + ${dataStore}-${source.version}+1.0.0-SNAPSHOT - - - - nexus - private-assets-nexus - ${deployNexusURL} - - - - - - - dev.ikm.maven.tinkar - tinkar-maven-plugin - - - - ${project.artifactId}-reasoned-export - - export-tinkar-data - - - ${project.build.directory} - ${dataStoreLocation}/${dataStore} - ${data-artifact.filename}-reasoned-pb.zip - false - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - assemble-origin-artifact - package - - single - - - - - reasoned-sa - - zip - - - - ${dataStore} - ${dataStoreLocation}/${dataStore} - - ** - - - MANIFEST.MF - - - - false - - - - - - - - - - - generateData + generateDataLocal - deployToNexus - true + altDeploymentRepository - org.codehaus.mojo - templating-maven-plugin + dev.ikm.maven.tinkar + tinkar-maven-plugin + - inject-maven-properties + ${project.artifactId}-reasoned-export - filter-sources + export-tinkar-data - loinc-export-pom-template - ${project.build.directory} - false + ${project.build.directory} + ${dataStoreLocation}/${dataStore} + ${project.artifactId}-${project.version}-reasoned-pb.zip + false - - - - - - - deployZipArtifacts - - - deployToNexus - true - - - - org.apache.maven.plugins - maven-deploy-plugin + maven-assembly-plugin - deploy-reasoned-sa - deploy + assemble-origin-artifact + package - deploy-file + single - nexus - ${deployNexusURL} - ${data-artifact.groupId} - ${data-artifact.artifactId} - ${data-artifact.version} - ${project.build.directory}/loinc-export-pom.xml - ${data-artifact.filename}-reasoned-sa.zip - zip - reasoned-sa + + + reasoned-sa + + zip + + + + ${dataStore} + ${dataStoreLocation}/${dataStore} + + ** + + + MANIFEST.MF + + + + false + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + - deploy-reasoned-pb - deploy + attach-artifacts + install - deploy-file + attach-artifact - nexus - ${deployNexusURL} - ${data-artifact.groupId} - ${data-artifact.artifactId} - ${data-artifact.version} - ${project.build.directory}/loinc-export-pom.xml - ${data-artifact.filename}-reasoned-pb.zip - zip - reasoned-pb + + + ${project.build.directory}/${project.artifactId}-${project.version}-reasoned-sa.zip + reasoned-sa + zip + + + ${project.build.directory}/${project.artifactId}-${project.version}-reasoned-pb.zip + reasoned-pb + zip + + diff --git a/loinc-origin/pom.xml b/loinc-origin/pom.xml index 37e4458..34266d2 100644 --- a/loinc-origin/pom.xml +++ b/loinc-origin/pom.xml @@ -7,215 +7,153 @@ dev.ikm.loinc loinc-data 1.0.0-SNAPSHOT - ../pom.xml + dev.ikm.data.loinc loinc-origin + ${revision} pom + loinc-origin - - dev.ikm.data.loinc - loinc-origin - ${data-artifact.path-prefix} - Loinc_${source.version}+1.0.0-SNAPSHOT - ${project.artifactId}-${project.version} - ${project.build.directory}/${data-artifact.prefix} - https://nexus.tinkarbuild.com/repository/maven-snapshots/ - false + ${dataStore}-${source.version}+1.0.0-SNAPSHOT - - - - - nexus - private-assets-nexus - ${deployNexusURL} - - + + + + generateDataLocal + + + altDeploymentRepository + + + + + + + dev.ikm.maven.tinkar + tinkar-maven-plugin + + + process-origin + + unzip-source + + + ${source.zip} + ${origin.working.directory} + + + + create-origin-manifest + + generate-manifest-resource + + + ${packager.name} + ${project.version} + ${origin.url} + ${origin.namespace} + ${origin.working.directory} + + + + - - - - - dev.ikm.maven.tinkar - tinkar-maven-plugin - - - process-origin - - unzip-source - - - ${source.zip} - ${origin.working.directory} - - - - create-origin-manifest - - generate-manifest-resource - - - ${packager.name} - ${project.version} - ${origin.url} - ${origin.namespace} - ${origin.working.directory} - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - assemble-origin-artifact - package - - single - - - - - data - - zip - - - - src - ${origin.working.directory} - - ** - - - MANIFEST.MF - - - - META-INF - ${origin.working.directory} - - MANIFEST.MF - - - - false - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - install - - attach-artifact - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-data.zip - - zip - - - - - - - - - - - - - - - - - - - - - - generateData - - - deployToNexus - true - - - - - - org.codehaus.mojo - templating-maven-plugin - - - inject-maven-properties - - filter-sources - - - loinc-origin-pom-template - ${project.build.directory} - false - - - - - - - + + org.codehaus.mojo + flatten-maven-plugin + + + flatten-test + initialize + + flatten + + + resolveCiFriendliesOnly + true + true + ${project.build.directory} + + + + - - - deployZipArtifacts - - - deployToNexus - true - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - deploy-origin-data - deploy - - deploy-file - - - nexus - ${deployNexusURL} - ${data-artifact.groupId} - ${data-artifact.artifactId} - ${data-artifact.version} - ${project.build.directory}/loinc-origin-pom.xml - ${data-artifact.filename}-data.zip - zip - - - - - - - - + + + org.apache.maven.plugins + maven-assembly-plugin + + + assemble-origin-artifact + package + + single + + + + + data + + zip + + + + src + + ${origin.working.directory} + + ** + + + MANIFEST.MF + + + + META-INF + + ${origin.working.directory} + + MANIFEST.MF + + + + false + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + install + + attach-artifact + + + + + + ${project.build.directory}/${project.artifactId}-${project.version}-data.zip + + zip + + + + + + + + + + diff --git a/loinc-pipeline/pom.xml b/loinc-pipeline/pom.xml index baa83b9..0646de1 100644 --- a/loinc-pipeline/pom.xml +++ b/loinc-pipeline/pom.xml @@ -23,14 +23,40 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-origin-data-dependency + validate + + copy + + + true + + + dev.ikm.data.loinc + loinc-origin + ${dataStore}-${source.version}+1.0.0-SNAPSHOT + zip + true + ${dataStoreLocation}/input-data + + + + + + + dev.ikm.loinc loinc-transformation-maven-plugin - 1.0.0-SNAPSHOT ${origin.namespace} ${dataStoreLocation}/${dataStore} - ${user.home}/.m2/repository/dev/ikm/loinc/loinc-origin/${project.version}/loinc-origin-${project.version}-data.zip + ${dataStoreLocation}/input-data/loinc-origin.zip ${project.build.directory} diff --git a/loinc-starterdata/pom.xml b/loinc-starterdata/pom.xml index 5477c0f..48311d6 100644 --- a/loinc-starterdata/pom.xml +++ b/loinc-starterdata/pom.xml @@ -75,7 +75,6 @@ dev.ikm.maven.tinkar tinkar-maven-plugin - ${maven-artifacts.version} @@ -96,19 +95,18 @@ - dev.ikm.maven - snomed-ct-starterdata-maven-plugin - 1.0.0-SNAPSHOT + dev.ikm.loinc + loinc-starterdata-maven-plugin ${origin.namespace} ${dataStoreLocation}/${dataStore} - run-snomed-starterdata + run-loinc-starterdata install - run-snomed-starterdata + run-loinc-starterdata @@ -116,7 +114,6 @@ dev.ikm.loinc loinc-starterdata-maven-plugin - 1.0.0-SNAPSHOT ${origin.namespace} ${dataStoreLocation}/${dataStore} diff --git a/plugin/loinc-starterdata-maven-plugin/pom.xml b/plugin/loinc-starterdata-maven-plugin/pom.xml index ed81fa7..5ffd456 100644 --- a/plugin/loinc-starterdata-maven-plugin/pom.xml +++ b/plugin/loinc-starterdata-maven-plugin/pom.xml @@ -18,7 +18,6 @@ org.apache.maven.plugins maven-plugin-plugin - ${maven-plugin-plugin.version} mojo-descriptor diff --git a/plugin/loinc-transformation-maven-plugin/pom.xml b/plugin/loinc-transformation-maven-plugin/pom.xml index 5c26711..70d40cd 100644 --- a/plugin/loinc-transformation-maven-plugin/pom.xml +++ b/plugin/loinc-transformation-maven-plugin/pom.xml @@ -19,7 +19,6 @@ org.apache.maven.plugins maven-plugin-plugin - ${maven-plugin-plugin.version} mojo-descriptor diff --git a/pom.xml b/pom.xml index 53ceb78..c70e193 100644 --- a/pom.xml +++ b/pom.xml @@ -272,9 +272,37 @@ org.sonatype.central central-publishing-maven-plugin - false - + + false + + + + org.codehaus.mojo + flatten-maven-plugin + 1.7.2 + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-no-bad-sections + + enforce + + + + requireProperty + false + + + + + From 61da3f01abefdec77768b253df592679f370b744 Mon Sep 17 00:00:00 2001 From: Aras Date: Thu, 18 Sep 2025 10:38:04 -0400 Subject: [PATCH 2/3] add github actions --- .github/workflows/build.yaml | 54 +++++++++++++++++++++++++++++++ .github/workflows/post_build.yaml | 40 +++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/post_build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..2d1c006 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,54 @@ +name: Build Workflow + +run-name: 'Build Workflow -- ${{ github.head_ref || github.ref_name }}' + +# Pipeline/Workflow Triggers +on: + push: + pull_request: + workflow_dispatch: + + +jobs: + pr-verification: + name: Pull Request Validation + runs-on: ubuntu-24.04 + if: github.event_name == 'pull_request' + steps: + - name: Pull Request Version Validation + uses: ikmdev/maven-pull-request-version-validation-action@v2.1.0 + + build-job: + name: Build Job + runs-on: ubuntu-24.04 + steps: + - name: Maven Settings File + uses: whelk-io/maven-settings-xml-action@v22 + with: + servers: '[{"id": "tinkar-nexus-private", "username": "admin", "password": "${{secrets.EC2_NEXUS_PASSWORD}}"}]' + mirrors: '[{"id": "tinkar-nexus-private", "mirrorOf": "*", "url": "https://nexus.tinkarbuild.com/repository/maven-private/"}]' + repositories: ' + [ + { + "id": "tinkar-nexus-private", + "name": "tinkar-nexus-private", + "url": "https://nexus.tinkarbuild.com/repository/maven-private/", + "releases": { + "enabled": "true", + "updatePolicy": "always", + "checksumPolicy": "fail" + }, + "snapshots": { + "enabled": "true", + "updatePolicy": "always", + "checksumPolicy": "fail" + } + } + ]' + output_file: ../.m2/tinkar-settings.xml + - name: Build IKMDEV Code + uses: ikmdev/maven-clean-install-build-action@v3.5.0 + with: + branch_name: ${{github.ref_name}} + mvn_additional_args: " -s '/home/runner/work/${{github.event.repository.name}}/.m2/tinkar-settings.xml'" + \ No newline at end of file diff --git a/.github/workflows/post_build.yaml b/.github/workflows/post_build.yaml new file mode 100644 index 0000000..842ebdc --- /dev/null +++ b/.github/workflows/post_build.yaml @@ -0,0 +1,40 @@ +name: Post Build Action + +run-name: 'Post Build Action -- ${{github.event.workflow_run.head_branch}}' + +on: + workflow_run: + workflows: + - Build Workflow + types: + - completed + +permissions: + contents: write + +jobs: + post-build: + name: Post Build Actions + runs-on: ubuntu-24.04 + if: github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'ikmdev' + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + repository: ${{github.event.workflow_run.head_repository.full_name}} + ref: ${{github.event.workflow_run.head_branch}} + fetch-depth: 0 + + - name: IKMDEV Post Build Action + id: ikmdev_post_build + uses: ikmdev/maven-post-build-action@v3.2.0 + with: + nexus_repo_password: ${{secrets.EC2_NEXUS_PASSWORD}} + branch_name: ${{github.event.workflow_run.head_branch}} + github_token: ${{secrets.GITHUB_TOKEN}} +# maven_central_username: ${{secrets.MC_SECRET_USERNAME}} +# maven_central_password: ${{secrets.MC_SECRET_PASSWORD}} + gpg_key: ${{secrets.GPG_KEY}} + gpg_passphrase: ${{secrets.GPG_PASSPHRASE}} + sonarcloud_token: ${{ secrets.SONAR_TOKEN }} + From 01b30075804c1992a6386ba220af1638ff0f6438 Mon Sep 17 00:00:00 2001 From: Aras Date: Thu, 18 Sep 2025 10:58:59 -0400 Subject: [PATCH 3/3] review changes --- loinc-starterdata/pom.xml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/loinc-starterdata/pom.xml b/loinc-starterdata/pom.xml index 48311d6..01a3cd6 100644 --- a/loinc-starterdata/pom.xml +++ b/loinc-starterdata/pom.xml @@ -94,23 +94,6 @@ - - dev.ikm.loinc - loinc-starterdata-maven-plugin - - ${origin.namespace} - ${dataStoreLocation}/${dataStore} - - - - run-loinc-starterdata - install - - run-loinc-starterdata - - - - dev.ikm.loinc loinc-starterdata-maven-plugin