Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

printf "\n\n\n\n**** RUNNING BUILD ********************\n\n"
APPDATE=`date "+%B %d, %Y"`

if [ -z $APP_NAME ] || [ -z $APP_VERSION ]; then
./app.env
fi

if [ -z $BUILD_NUMBER ]; then
BUILD_NUMBER="SNAPSHOT"
fi

if [ -z $JOB_NAME ]; then
JOB_NAME=$APP_NAME
fi

if [ -z $STAGING_DIR ]; then
printf "STAGING_DIR not specified, defaulting to dist/\n";
STAGING_DIR="dist"
else
STAGING_DIR=$(echo ${STAGING_DIR} | sed 's:/*$::')
printf "Using staging directory '$STAGING_DIR'\n";
fi

if [ -d $STAGING_DIR ] && [ $STAGING_DIR != "." ]; then
printf "Cleaning staging directory...\n"
rm -r $STAGING_DIR
else
printf "No staging directory to be cleaned at ${STAGING_DIR}\n"
fi

if [ -z $BUILD_DIR ]; then
printf "Artifact directory 'BUILD_DIR' not specified, defaulting to build/\n";
BUILD_DIR="build"
else
BUILD_DIR=$(echo ${BUILD_DIR} | sed 's:/*$::')
printf "Using build directory '$BUILD_DIR'\n";
fi

if [ -d $BUILD_DIR ] && [ $BUILD_DIR != "." ]; then
printf "Cleaning build directory...\n"
rm -r $BUILD_DIR
else
printf "No build directory to be cleaned at ${BUILD_DIR}\n"
fi

if [ -z ${DTR_PREFIX// }${DTR_ORG// } ]; then
printf "Both DTR_PREFIX and DTR_ORG not set, pointing Docker images to dev\n"
DTR_PREFIX=dev
fi

if [ -f $JOB_NAME*.tar.gz ]; then
printf "Cleaning old build artifacts from workspace root\n"
rm $JOB_NAME*.tar.gz
fi

# Determine where the script is located
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
# if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
scriptPath="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

# Build Artifact Production
printf "\n\n**** Optional: Producing Build Artifacts ********************\n\n"

# copy docker files
mkdir -p $BUILD_DIR
mkdir -p $STAGING_DIR

if [ $STAGING_DIR != "dist" ]; then
# Need to move the grunt output from dist (where grunt puts it) to staging
# This is a hack, ideally grunt just builds to the right directory
cp -R dist/* $STAGING_DIR
fi

cd seoc-reactor/
mvn clean package -Dmaven.test.skip=true
cd ..
ls -la ./seoc-reactor
ls -la ./seoc-reactor/seoc-rest-api
ls ./seoc-reactor/seoc-rest-api

#sleep 1200

echo "looking for jar"
find / -name *jar

ls ./seoc-reactor/seoc-rest-api/target

mv ./seoc-reactor/seoc-rest-api/target/*jar .
cp ./*jar out
printf "\n\n\n\n**** COMPLETED BUILD ********************\n\n"