aboutsummaryrefslogtreecommitdiffstats
path: root/s2i/bin/assemble
diff options
context:
space:
mode:
Diffstat (limited to 's2i/bin/assemble')
-rwxr-xr-xs2i/bin/assemble26
1 files changed, 26 insertions, 0 deletions
diff --git a/s2i/bin/assemble b/s2i/bin/assemble
new file mode 100755
index 0000000..918395e
--- /dev/null
+++ b/s2i/bin/assemble
@@ -0,0 +1,26 @@
+#!/bin/bash -e
+#
+# S2I assemble script for the 'kraxel/s2i-jekyll' image.
+# The 'assemble' script builds your application source so that it is ready to run.
+#
+# For more information refer to the documentation:
+# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md
+#
+
+# If the 'kraxel/s2i-jekyll' assemble script is executed with the '-h' flag, print the usage.
+if [[ "$1" == "-h" ]]; then
+ exec /usr/libexec/s2i/usage
+fi
+
+# Restore artifacts from the previous build (if they exist).
+#
+if [ "$(ls /tmp/artifacts/ 2>/dev/null)" ]; then
+ echo "---> Restoring build artifacts..."
+ mv /tmp/artifacts/. ./
+fi
+
+echo "---> Installing application source..."
+cp -Rf /tmp/src/. ./
+
+echo "---> Building application from source..."
+# TODO: Add build steps for your application, eg npm install, bundle install, pip install, etc.