Skip to content
Merged
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
54 changes: 54 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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'"

40 changes: 40 additions & 0 deletions .github/workflows/post_build.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

191 changes: 62 additions & 129 deletions loinc-export/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>loinc-export</artifactId>
<groupId>dev.ikm.data.loinc</groupId>
<artifactId>loinc</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>

<name>loinc-export</name>
Expand All @@ -16,167 +18,98 @@
<!-- Properties For Deploying Zip To Nexus -->

<properties>
<data-artifact.groupId>dev.ikm.tinkar.data</data-artifact.groupId>
<data-artifact.artifactId>loinc</data-artifact.artifactId>
<data-artifact.filename>${data-artifact.path-prefix}</data-artifact.filename>
<data-artifact.version>${source.version}-1.0.0</data-artifact.version>
<data-artifact.prefix>${project.artifactId}-${project.version}</data-artifact.prefix>
<data-artifact.path-prefix>${project.build.directory}/${data-artifact.prefix}</data-artifact.path-prefix>
<deployNexusURL>https://nexus.tinkarbuild.com/repository/private-assets/</deployNexusURL>
<deployToNexus>false</deployToNexus>
<revision>${dataStore}-${source.version}+1.0.0-SNAPSHOT</revision>
</properties>

<!-- Distribution info for private assets repo in Nexus -->
<distributionManagement>
<repository>
<id>nexus</id>
<name>private-assets-nexus</name>
<url>${deployNexusURL}</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>dev.ikm.maven.tinkar</groupId>
<artifactId>tinkar-maven-plugin</artifactId>
<executions>
<!-- Export reasoned data as a protocol buffers zip file (package) -->
<execution>
<id>${project.artifactId}-reasoned-export</id>
<goals>
<goal>export-tinkar-data</goal>
</goals>
<configuration>
<exportDirectory>${project.build.directory}</exportDirectory>
<dataStore>${dataStoreLocation}/${dataStore}</dataStore>
<fileName>${data-artifact.filename}-reasoned-pb.zip</fileName>
<isolate>false</isolate>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble-origin-artifact</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<inlineDescriptors>
<inlineDescriptor>
<id>reasoned-sa</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<outputDirectory>${dataStore}</outputDirectory>
<directory>${dataStoreLocation}/${dataStore}</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>MANIFEST.MF</exclude>
</excludes>
</fileSet>
</fileSets>
<includeBaseDirectory>false</includeBaseDirectory>
</inlineDescriptor>
</inlineDescriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<!-- Profile to generate data/template pom -->
<profile>
<id>generateData</id>
<id>generateDataLocal</id>
<activation>
<property>
<name>deployToNexus</name>
<value>true</value>
<name>altDeploymentRepository</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<groupId>dev.ikm.maven.tinkar</groupId>
<artifactId>tinkar-maven-plugin</artifactId>
<executions>
<!-- Export reasoned data as a protocol buffers zip file (package) -->
<execution>
<id>inject-maven-properties</id>
<id>${project.artifactId}-reasoned-export</id>
<goals>
<goal>filter-sources</goal>
<goal>export-tinkar-data</goal>
</goals>
<configuration>
<sourceDirectory>loinc-export-pom-template</sourceDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
<skipPoms>false</skipPoms>
<exportDirectory>${project.build.directory}</exportDirectory>
<dataStore>${dataStoreLocation}/${dataStore}</dataStore>
<fileName>${project.artifactId}-${project.version}-reasoned-pb.zip</fileName>
<isolate>false</isolate>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- Deploy Zip File To Nexus -->
<profile>
<id>deployZipArtifacts</id>
<activation>
<property>
<name>deployToNexus</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>deploy-reasoned-sa</id>
<phase>deploy</phase>
<id>assemble-origin-artifact</id>
<phase>package</phase>
<goals>
<goal>deploy-file</goal>
<goal>single</goal>
</goals>
<configuration>
<repositoryId>nexus</repositoryId>
<url>${deployNexusURL}</url>
<groupId>${data-artifact.groupId}</groupId>
<artifactId>${data-artifact.artifactId}</artifactId>
<version>${data-artifact.version}</version>
<pomFile>${project.build.directory}/loinc-export-pom.xml</pomFile>
<file>${data-artifact.filename}-reasoned-sa.zip</file>
<packaging>zip</packaging>
<classifier>reasoned-sa</classifier>
<inlineDescriptors>
<inlineDescriptor>
<id>reasoned-sa</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<outputDirectory>${dataStore}</outputDirectory>
<directory>${dataStoreLocation}/${dataStore}</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>MANIFEST.MF</exclude>
</excludes>
</fileSet>
</fileSets>
<includeBaseDirectory>false</includeBaseDirectory>
</inlineDescriptor>
</inlineDescriptors>
</configuration>
</execution>
</executions>
</plugin>
<!-- Attach Tinkar export Artifact to project -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>deploy-reasoned-pb</id>
<phase>deploy</phase>
<id>attach-artifacts</id>
<phase>install</phase>
<goals>
<goal>deploy-file</goal>
<goal>attach-artifact</goal>
</goals>
<configuration>
<repositoryId>nexus</repositoryId>
<url>${deployNexusURL}</url>
<groupId>${data-artifact.groupId}</groupId>
<artifactId>${data-artifact.artifactId}</artifactId>
<version>${data-artifact.version}</version>
<pomFile>${project.build.directory}/loinc-export-pom.xml</pomFile>
<file>${data-artifact.filename}-reasoned-pb.zip</file>
<packaging>zip</packaging>
<classifier>reasoned-pb</classifier>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-reasoned-sa.zip</file>
<classifier>reasoned-sa</classifier>
<type>zip</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-reasoned-pb.zip</file>
<classifier>reasoned-pb</classifier>
<type>zip</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
Expand Down
Loading
Loading