STAND-128: Add GitHub Actions workflow to build and test in Standalone 2.x Reff App#86
Conversation
|
@dkayiwa For the windows we havent supported it on 2.x but will be the next step thats why its failing |
| with: | ||
| repository: openmrs/openmrs-core | ||
| ref: 2.8.x | ||
| path: openmrs-core |
There was a problem hiding this comment.
Added this since for 2.8.x+ Snapshot artifacts are not published and cannot be pulled and built on CI this is a twist which later
- name: Build and install openmrs-core
run: |
cd openmrs-core
mvn clean install -DskipTests
builds the repo like locally
There was a problem hiding this comment.
What happens when we remove it?
There was a problem hiding this comment.
It results into
Downloaded from openmrs-repo: https://mavenrepo.openmrs.org/public/org/liquibase/liquibase-commercial/4.23.2/liquibase-commercial-4.23.2.pom (1.5 kB at 14 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for referenceapplication-standalone 2.6.0-SNAPSHOT:
[INFO]
[INFO] referenceapplication-standalone .................... SUCCESS [ 21.971 s]
[INFO] referenceapplication-standalone-01 ................. FAILURE [ 17.403 s]
[INFO] referenceapplication-standalone-02 ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.491 s
[INFO] Finished at: 2025-08-25T07:28:49Z
[INFO] ------------------------------------------------------------------------
Error: Failed to execute goal org.liquibase:liquibase-maven-plugin:4.23.2:update (empty-database-create-schema) on project referenceapplication-standalone-01: Execution empty-database-create-schema of goal org.liquibase:liquibase-maven-plugin:4.23.2:update failed: Plugin org.liquibase:liquibase-maven-plugin:4.23.2 or one of its dependencies could not be resolved:
Error: Failed to read artifact descriptor for org.openmrs.api:openmrs-api:jar:2.8.1-SNAPSHOT
Error:
Error: -> [Help 1]
Error:
Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.
Error:
Error: For more information about the errors and possible solutions, please read the following articles:
Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Error:
Error: After correcting the problems, you can resume the build with the command
Error: mvn <args> -rf :referenceapplication-standalone-01
But only on CI and passes locally
There was a problem hiding this comment.
What will happen when we need to use the 3.0.x branch?
There was a problem hiding this comment.
Basically tried the master branch but as we talk now it points 3.0.0 version ... by using this am hoping for future develops this will require manual overide to point to the branch its building towards
There was a problem hiding this comment.
Can you include that in the documentation?
There was a problem hiding this comment.
oh yes let me add it
| application_data_directory=appdata | ||
| reset_connection_password=true | ||
| vm_arguments=-Xmx512m -Xms512m -XX:NewSize=128m --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED | ||
| vm_arguments=-Xmx512m -Xms512m -XX:NewSize=128m --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED |
There was a problem hiding this comment.
Is this a part of github actions?
There was a problem hiding this comment.
not really let me remove it and add it in another PR
| <configuration> | ||
| <finalName>openmrs-standalone</finalName> | ||
| <appendAssemblyId>false</appendAssemblyId> | ||
| <attach>true</attach> |
There was a problem hiding this comment.
Previously i was facing
Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.4.1:jar (default-jar) on project referenceapplication-standalone-02:
You have to use a classifier to attach supplemental artifacts to the project instead of replacing them.
Without attaching, Maven treats the assembly as a temporary build output, not an artifact, which breaks the build since it does not include openmrs-standalone.jar but attaching helps to treat it as the main artifact
| <executions> | ||
| <execution> | ||
| <id>package-jar-with-dependencies</id> | ||
| <phase>prepare-package</phase> |
There was a problem hiding this comment.
This helps the attaching not to temporarily treat it as a temporary build output
Ticket - https://openmrs.atlassian.net/browse/STAND-128
This ticket adds Github actions to the standalone repo to run on push and pull requests on the openmrs-emr2 branch
cc @dkayiwa @wikumChamith