Skip to content
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

O3-2753: Add ability to publish frontend configuration to Maven #780

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

ibacher
Copy link
Member

@ibacher ibacher commented Jan 24, 2024

Apparently I lied and there was more. This adds a POM and some structure to allow us to publish the spa-assemble-config.json (with version numbers) and the spa-build-config.json files as a Maven artifact.

In CI we will have something like this:

docker create --name=openmrs-frontend-container openmrs/openmrs-reference-application-3-frontend:nightly
docker cp openmrs-frontend-container:/usr/share/nginx/html/spa-assemble-config.json src/main/resources/spa-assemble-config.json
docker rm openmrs-frontend-container

Note that this means that the POM in the frontend directory is intended only as a "publication POM" and not a "actual build".

@ibacher ibacher requested a review from rbuisson January 24, 2024 19:40
Copy link
Contributor

@rbuisson rbuisson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibacher , mvn clean package -Pfrontend does not seem to output a file. There is a Zip but it looks like it's empty.

Is that supposed to be?

@ibacher
Copy link
Member Author

ibacher commented Jan 26, 2024

@rbuisson That's kind of what I meant that this is a "publication POM" not a "actual build", that is the POM here depends on the Docker build rather than the other way around. The main build for the RefApp is still docker compose build, there's just an additional step that will extract the necessary file from the built container.

@ibacher ibacher merged commit 4c287cb into main Jan 26, 2024
7 checks passed
@ibacher ibacher deleted the O3-2753-2 branch January 26, 2024 15:58
@ibacher
Copy link
Member Author

ibacher commented Jan 26, 2024

@rbuisson As an update, you can see the published Zip here.

@rbuisson
Copy link
Contributor

rbuisson commented Jan 26, 2024

Thanks. I understood it the other way around. As in "publication POM" was to only output the file that will be published, and not used anywhere else in the project.

I can see the published artefact 👍🏻 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants