-
Notifications
You must be signed in to change notification settings - Fork 6
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
Graal support #2533
Graal support #2533
Conversation
This isn't a java-library, and adding this makes Graal generate a dynamic library instead of an executable
See micronaut-projects/micronaut-flyway#540 for the flyway issue
server/build.gradle
Outdated
|
||
// When we are building on CI, we do not want to include the dev migrations. | ||
def isCI = System.getenv("CI") != null | ||
def migrationLocations = isCI ? "db/common" : "db/common,db/dev" |
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.
What if we are building for the dev environment? We run the dev migrations there.
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.
Good call...
I'm wondering whether we should pivot to simply use dockerBuildNative
on CI to generate the docker image automatically for us...
I've pushed a commit which does this (and tests the image building works on CI), and also switched to check the SERVICE_NAME
and var (and disable the dev db load when it exists and equals checkins-master
)
@mkimberlin I have aligned both the They currently both also trigger on pushes to the Should the deploy job depend on the test job passing? We could just inline the I tried to pull commonality out into separate actions, and stitch them together as a github workflow-run, but I could not work out how to get the docker auth to work when it was run in a separate action, so I rolled it back and went with this... It may be worth pulling the URL out into the |
Agreed.
Let's leave it as is for the moment. Broken code in dev doesn't worry me too much. Rollback is pretty easy, and this allows us to validate while the test suite is running.
It was inline, but I pulled it out because of how long the tests take.
I went down a similar path at one point and just hit eject on that.
Agreed on that, too. I thought about that after we got off of stand-up earlier and then neglected to mention it in chat. |
Ok, extracted the URL in the actions to an ENV var There's an introspection issue with the native tests which I'm looking into now |
We don't need to assemble, or build a docker image, or cache sonar things (as we're not doing sonar)
I have removed the |
Closes #2532
Instructions for local building
To compile, install a GraalVM JDK for Java 21 (i.e.
sdk install java 21.0.3-graal
)Run
./gradlew nativeCompile
Create a
nativeRun.sh
script which is a copy ofrun.sh
but withIn place of
./gradlew run
at the endUsage on Cloud-run
I propose for cloud-run we make use of
./gradlew dockerBuildNative
.This PR has updated the Gradle file to configure the image name when executed via Github actions to be the same as the current process...
We should be able to just replace the
Build the Docker image
step in the actions with one to run this task.Tests
./gradlew nativeTest
to run the tests against a native binary.@DisabledInNativeImage
annotation