Skip to content
Snippets Groups Projects
Commit 409e14b6 authored by Lennart Kramer's avatar Lennart Kramer
Browse files

Try committing to dockerhub

parent 427d01ec
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ stages:
variables:
GIT_SUBMODULE_STRATEGY: recursive
REGISTRY: "http://registry:5000"
REGISTRY: "mathinstitut"
# gitlab ci script taken from https://gist.github.com/danielneis/5c6140ec8150c6151a54bccd26950278
......
......@@ -3,21 +3,14 @@
# arg2: maxima version
# arg3: stack or moodle version: "stack-XXX" or "moodlev.X"
# arg4: LIB_PATH
# arg5: REGISTRY IP
# arg5: REGISTRY or dockerhub id
# arg6: version of goemaxima
#
echo "starting to build image for:"
echo "sbcl: $1"
echo "maxima: $2"
echo "stack: $3"
# tag the image
if [ -n "$6" ]; then
IMAGENAME="$5/goemaxima-$3:$6"
else
IMAGENAME="$5/goemaxima-$3:dev"
fi
# check if the image already exists on the server
docker pull "${IMAGENAME}"
IMAGENAME="goemaxima:$3"
# build it
if [ "$3" = "2017121800" ]; then
docker build -t "${IMAGENAME}" --build-arg MAXIMA_VERSION="$2" --build-arg SBCL_VERSION="$1" --build-arg LIB_PATH="$4" --build-arg "MAX_LIB_PATH=/opt/maxima/assets/maximalocal.mac" . || exit 1
......@@ -25,6 +18,10 @@ else
docker build -t "${IMAGENAME}" --build-arg MAXIMA_VERSION="$2" --build-arg SBCL_VERSION="$1" --build-arg LIB_PATH="$4" . || exit 1
fi
echo "${IMAGENAME} wurde erfolgreich gebaut."
# push it
docker push "${IMAGENAME}"
# push the image
docker tag "$IMAGENAME" "$5/$IMAGENAME-dev"
docker push "$5/$IMAGENAME-dev"
if [ -n "$6" ]; then
docker tag "$IMAGENAME" "$5/$IMAGENAME-$6"
docker push "$5/$IMAGENAME-$6"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment