*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 717f4b97 authored by Muck, Katrin's avatar Muck, Katrin
Browse files

Added only-vsc4 flag

parent 93af8c92
Branches
No related tags found
No related merge requests found
......@@ -2,11 +2,13 @@
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
VSC3_IMAGE_PATH=/mnt/NFS/vsc3_src/USIF/jupyter-notebook
VSC4_IMAGE_PATH=/mnt/NFS/vsc4_src/usif/jupyter-notebook
function usage() {
echo "usage: $0 <output> <source> <name> <group> <docker-tag> [only-vsc3] [dry-run] [testing]"
echo "usage: $0 <output> <source> <name> <group> <docker-tag> [only-vsc3]|[only-vsc4] [dry-run] [testing]"
echo ""
echo " output temp output path where the files will be built"
echo " source path to the json, def and meta source files"
......@@ -16,6 +18,7 @@ function usage() {
echo ""
echo " optional:"
echo " only-vsc3 if this argument is set the output files will only be copied to VSC3 folders"
echo " only-vsc4 if this argument is set the output files will only be copied to VSC4 folders"
echo " dry-run only render the config files and exit"
echo " testing add testing flag for .def & .meta file generation"
echo ""
......@@ -37,6 +40,9 @@ while [ ! -z "$PARAMETER" ]; do
if [ "$PARAMETER" == 'only-vsc3' ]; then
ONLY_VSC3=1
echo "Only copying to VSC3."
elif [ "$PARAMETER" == 'only-vsc4' ]; then
ONLY_VSC4=1
echo "Only copying to VSC4."
elif [ "$PARAMETER" == 'dry-run' ]; then
DRY_RUN=1
echo "!!! Dry-run enabled !!!"
......@@ -55,7 +61,7 @@ done
mkdir -p $OUTPUT_PATH
./tools/generate_config.py $OUTPUT_PATH $SOURCE_PATH tools \
$SCRIPT_DIR/tools/generate_config.py $OUTPUT_PATH $SOURCE_PATH tools \
$VARIANT_NAME $VARIANT_GROUP $VARIANT_DOCKER_TAG \
$TESTING
......@@ -85,13 +91,15 @@ if [ -z "$ONLY_VSC3" ]; then
fi
fi
echo "Copying built image to VSC-3 jupyterhub NFS share"
if [ -z "$DRY_RUN" ]; then
mkdir -p $VSC3_IMAGE_PATH/$VARIANT_GROUP/
mv -v $VARIANT_IMAGE $VARIANT_DEF $VARIANT_META $VSC3_IMAGE_PATH/$VARIANT_GROUP/
else
echo "mkdir -p $VSC3_IMAGE_PATH/$VARIANT_GROUP/"
echo "mv -v $VARIANT_IMAGE $VARIANT_DEF $VARIANT_META $VSC3_IMAGE_PATH/$VARIANT_GROUP/"
if [ -z "$ONLY_VSC4" ]; then
echo "Copying built image to VSC-3 jupyterhub NFS share"
if [ -z "$DRY_RUN" ]; then
mkdir -p $VSC3_IMAGE_PATH/$VARIANT_GROUP/
mv -v $VARIANT_IMAGE $VARIANT_DEF $VARIANT_META $VSC3_IMAGE_PATH/$VARIANT_GROUP/
else
echo "mkdir -p $VSC3_IMAGE_PATH/$VARIANT_GROUP/"
echo "mv -v $VARIANT_IMAGE $VARIANT_DEF $VARIANT_META $VSC3_IMAGE_PATH/$VARIANT_GROUP/"
fi
fi
echo "Done $VARIANT_NAME."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment