Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
FROM codacy-cppcheck-base as dev

RUN apk add openjdk17
COPY docs /docs
COPY addons/misra* /workdir/addons/
RUN adduser --uid 2004 --disabled-password --gecos "" docker
COPY target/universal/stage/ /workdir/
RUN chmod +x /workdir/bin/codacy-cppcheck
USER docker
COPY docs /docs
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

The changes in this PR do not reflect the title 'bump: Update graalvm native image'. The GraalVM version in the builder stage (line 14) remains at 22.3.3, and the only modifications are trailing whitespace removals. Try running the following prompt in your coding agent: > Update the GraalVM image version in the builder stage of the Dockerfile to the latest compatible version.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we care about the version in this image? It seems to be only used for dev purposes, but it would be nice if it matched what's in sbt.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I checked and:

  • On docker hub there is no 22.3.1 image
  • On Coursier Index (the one used by Sbt when building) there is no 22.3.3 JVM

I could have changed to use a default sbt image since sbt downloads the JVM to run native-image on the fly but I haven't spent much effort on it.

Sorry, I had auto-merge enabled.

COPY addons/misra* /workdir/addons/
RUN adduser --uid 2004 --disabled-password --gecos "" docker
COPY target/universal/stage/ /workdir/
RUN chmod +x /workdir/bin/codacy-cppcheck
USER docker
WORKDIR /workdir
ENTRYPOINT ["bin/codacy-cppcheck"]

Expand Down
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ lazy val root = project
name := "codacy-cppcheck",
libraryDependencies ++= Seq("com.codacy" %% "codacy-engine-scala-seed" % "6.1.5"),
mainClass in Compile := Some("codacy.Engine"),
nativeImageOptions ++= List("-O1", "-H:+ReportExceptionStackTraces", "--no-fallback", "--no-server", "--static")
nativeImageOptions ++= List("-O1", "-H:+ReportExceptionStackTraces", "--no-fallback", "--no-server", "--static"),
nativeImageVersion := "22.3.1",
nativeImageJvm := "graalvm-java17"
)
.enablePlugins(NativeImagePlugin)
.enablePlugins(JavaAppPackaging)
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "25.2.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6")
addSbtPlugin("org.scalameta" % "sbt-native-image" % "0.3.4")
addSbtPlugin("org.scalameta" % "sbt-native-image" % "0.4.0")