diff --git a/tests/venv/start/postBuild/README.rst b/tests/venv/start/postBuild/README.rst new file mode 100644 index 00000000..1a9851f3 --- /dev/null +++ b/tests/venv/start/postBuild/README.rst @@ -0,0 +1,8 @@ +System - Post-build scripts +--------------------------- + +It is possible to run scripts after you've built the environment specified in +your other files. This could be used to, for example, download data or run +some configuration scripts. + +In this example, we download and install a Jupyter Notebook extension. diff --git a/tests/venv/start/postBuild/postBuild b/tests/venv/start/postBuild/postBuild new file mode 100755 index 00000000..28b840f0 --- /dev/null +++ b/tests/venv/start/postBuild/postBuild @@ -0,0 +1,2 @@ +#!/bin/bash +jupyter nbextension enable --py --sys-prefix ipyleaflet diff --git a/tests/venv/start/postBuild/requirements.txt b/tests/venv/start/postBuild/requirements.txt new file mode 100644 index 00000000..5a2f5096 --- /dev/null +++ b/tests/venv/start/postBuild/requirements.txt @@ -0,0 +1 @@ +ipyleaflet diff --git a/tests/venv/start/postBuild/start b/tests/venv/start/postBuild/start new file mode 100644 index 00000000..c458c91a --- /dev/null +++ b/tests/venv/start/postBuild/start @@ -0,0 +1,5 @@ +#!/bin/bash + +export TEST_START_VAR="var is set" + +exec "$@" diff --git a/tests/venv/start/postBuild/verify b/tests/venv/start/postBuild/verify new file mode 100755 index 00000000..cc0d9ea7 --- /dev/null +++ b/tests/venv/start/postBuild/verify @@ -0,0 +1,9 @@ +#!/bin/bash +set -euo pipefail +jupyter nbextension list | grep 'jupyter-leaflet' | grep enabled + +if [ "$TEST_START_VAR" != "var is set" ] +then + echo "TEST_START_VAR is not set" + exit 1 +fi