Skip to content

Commit 9086b46

Browse files
committed
OPENJDK-2408: binary build with custom s2i assemble script
A variant of spring-boot-sample-simple/target, i.e. a pre-built JAR to provoke the s2i assemble script's "binary" path, with an added .s2i/bin/assemble script which is invoked by s2i instead of the builder image's assemble script. This script simply ensures there's a minimum of a one second interval between the start of the s2i process (after the application source has been copied into the s2i container) and the invocation of the builder image's assemble script. This ensures that, if the builder image script does not preserve the modified timestamp of the binary, the time delta is at least one second. Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 39633f6 commit 9086b46

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# we put a sleep here to ensure that there's at least a one second difference
5+
# between the ctime of the app source (copied in by s2i) and any artefacts
6+
# created by the build/assemble.
7+
echo appsrc-provided s2i assemble script executed
8+
sleep 1
9+
echo delegating to builder image s2i assemble
10+
11+
exec /usr/local/s2i/assemble "$@"

0 commit comments

Comments
 (0)