-
Notifications
You must be signed in to change notification settings - Fork 32
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
OZ-462: Ozone distro to repackage the O3 frontend #42
OZ-462: Ozone distro to repackage the O3 frontend #42
Conversation
Let's have the OpenMRS frontend always being re-assembled by Ozone even though based on default Ref App assemble JSON. That way we can always assume binaries will be present in the |
As discussed in the call, we would want to be able to override the |
I still hesitant on this one. |
@rbuisson Another two questions (from the latest commit): I externalized the Groovy from the version embedded in the POM to an actual file, with the idea that it could be shared from Ozone to Ozone implementations and moved this to
|
@ibacher ,
"Ozone distro" what package exactly? The final ozone? or ozone-distro? |
Works for me. |
Oh, I like that idea a lot better. Let me refactor things again. Yeah, I was meaning literally part of the ozone-distro artifact, but that's less than ideal. |
So I've added a |
ozone-distro-parent/pom.xml
Outdated
<artifactId>gmavenplus-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>Rebuild OpenMRS Frontend if necessary</id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be renamed to "Rebuild OpenMRS Frontend"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one only triggers if there are local customisations, but I can rename it.
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory>${project.basedir}/configs/openmrs/frontend_assembly</directory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this path correct?
I thought the frontend assembly config file was moved to scripts/
.
Anyway, I don't see it in /configs/openmrs/frontend_assembly
either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step copies the implementation-specific spa-assemble-config.json
file, if any. I didn't change that location, but I can if it makes more sense in scripts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's OK we can leave it at this place.
But shouldn't this be distro/configs/openmrs/frontend_assembly
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the implementation-specific projects, we usually don't have a distro
sub-folder...
@ibacher , the frontend build seems to hang when running
and it hangs here. |
@rbuisson What version of Node do you have installed? (See the assumptions in the initial post of this PR). (I honestly have never seen any of the messages after the |
Yep. What using a 17.x. Works fine with 18.x. |
Ah... I should revise the comment. We support the LTS versions of Node, which honestly means "the even version numbers" (Node's versioning policy is that every other major release is LTS). I tested it with 16 and 18, but not 17. |
This is an attempt to fulfill OZ-462. I have not yet added docs, as there are some details I'm hoping to finalize.
Assumptions:
How this works:
$OZONE_DIR/configs/openmrs/frontend_assembly/reference-application-spa-assemble-config.json
spa-assemble-config.json
file in$DISTRO_ROOT/configs/openmrs/frontend_assembly
that specifies their additions and removals.reference-application-spa-assemble-config.json
is copied to${project.build.directory}/openmrs_frontend
and thespa-assemble-config.json
file (if any) is copied to${project.build.directory}/openmrs_frontend
.spa-assemble-config.json
file is found, then theassemble
(and, for now, at least,build
) commands will be run. The outputs of this are published to/distro/binaries/openmrs/frontend/
.Open questions:
/distro/binaries/openmrs/frontend/
, e.g., so that this works with Docker?(Apologies for adding yet more Groovy; I couldn't figure out how to do the necessary scripting in Ant)