#!/bin/bash ############# # VARIABLES # ############# REPO_DIR="$(git rev-parse --show-toplevel 2>/dev/null)" [ -z "$REPO_DIR" ] && { echo "You must execute under a valid git repository !" ; exit 1 ; } IMAGEDIR=${REPO_DIR}/docker-images/anna-adml-http AD=${IMAGEDIR}/opt/adml VARIANT=${1:-Release} ############# # EXECUTION # ############# echo echo "Variant: ${VARIANT}" echo "Remember usage: $0 [variant: <[Release]|Debug]>" echo TAG=$(${REPO_DIR}/tools/version) # Docker build functions source ${REPO_DIR}/tools/docker.src # Deploy Anna-ADML-HTTP: rm -rf ${AD} echo ${AD} | ${REPO_DIR}/example/diameter/launcher/deploy-adml-http.sh ${VARIANT} || exit 1 # Add interesting stuff: mkdir ${AD}/utils cp -r ${REPO_DIR}/example/diameter/launcher/resources/rest_api/helpers/diameterJsonHelper ${AD}/utils cp ${REPO_DIR}/example/diameter/pcapDecoder/tsharkDecoder.sh ${AD}/utils cp ${REPO_DIR}/example/diameter/launcher/resources/scripts/decode.sh ${AD}/utils echo echo "Generate docker image ..." [ "${VARIANT}" = "Debug" ] && TAG=${TAG}-debug build_image ${IMAGEDIR} ${TAG} ${IMAGEDIR} || exit 1 echo echo "Done !" echo