michael-simons / neo4j-migrations

Automated script runner aka "Migrations" for Neo4j. Inspired by Flyway.
https://michael-simons.github.io/neo4j-migrations/
Apache License 2.0
115 stars 23 forks source link

CLI cypher based migration, possibility to run the binary without java dependency. #934

Closed amit-kumaryadav closed 1 year ago

amit-kumaryadav commented 1 year ago

Hi Micahel,

I want to run the cypher based migration without java dependency. I tried but I'm getting the below issue. is it possible to run the CLI binary without java, I want to integrate this in CI/CD pipeline to run the migrations. But I'm able to run the CLI binary with java 17 dependency. If it's not possible to run the CLI binary without java then which version is based on java 11 (Current project does not allow java 17).

image

Even I tried with other linux version too.

image

image

michael-simons commented 1 year ago

He Amit, it looks like you are on windows. Are you sure you have downloaded the windows binary?

https://github.com/michael-simons/neo4j-migrations/releases/download/2.2.2/neo4j-migrations-2.2.2-windows-x86_64.zip

amit-kumaryadav commented 1 year ago

Hi Michael, I'm on ubuntu 20 machine

michael-simons commented 1 year ago

The first screenshot seems to be the JVM version. The 2nd one is the version you are looking for. The error printed is expected, see https://github.com/michael-simons/neo4j-migrations/issues/828

You need libc in the container

https://www.graalvm.org/22.0/reference-manual/native-image/StaticImages/

Mostly static native images statically link against all libraries except libc. This approach is ideal for deploying such native images on distroless container images. Note that it currently only works when linking against glibc.

amit-kumaryadav commented 1 year ago

Hi Michael, I installed the "frolvlad/alpine-glibc" in docker container and it's working fine now. Thanks for help!!

michael-simons commented 1 year ago

Excellent, @amit-kumaryadav and I have to thank you for your request, as we found an issue with the compressed binaries on windows.

michael-simons commented 1 year ago

@all-contributors please add @amit-kumaryadav for userTesting

allcontributors[bot] commented 1 year ago

@michael-simons

I've put up a pull request to add @amit-kumaryadav! :tada: