Skip to content

Commit

Permalink
Fail build when combining compression with remote-container-build
Browse files Browse the repository at this point in the history
Make clear to users that UPX compression is not yet supported when using
remote-container-build.

Relates to #34638
  • Loading branch information
zakkak committed Jul 18, 2023
1 parent 581cec3 commit 9a53a94
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public void compress(NativeConfig nativeConfig, NativeImageRunnerBuildItem nativ
if (!runUpxFromHost(upxPathFromSystem.get(), image.getPath().toFile(), nativeConfig)) {
throw new IllegalStateException("Unable to compress the native executable");
}
} else if (nativeConfig.remoteContainerBuild()) {
log.errorf("Compression of native executables is not yet implemented for remote container builds.");
throw new IllegalStateException(
"Unable to compress the native executable: Compression of native executables is not yet supported for remote container builds");
} else if (nativeImageRunner.isContainerBuild()) {
log.infof("Running UPX from a container using the builder image: " + effectiveBuilderImage);
if (!runUpxInContainer(image, nativeConfig, effectiveBuilderImage)) {
Expand Down

0 comments on commit 9a53a94

Please sign in to comment.