aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/build_catalog_ui.bat
blob: b00ee0875b8b45c4362f750a4e751d45ea60c716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
rem nvmw use v0.12.4
echo "configure proxy for ATT"
call npm config set proxy http://one.proxy.att.com:8080

echo "npm cache clean"
call npm cache clean

echo "npm install"
call npm install

if %errorlevel% NEQ 0 GOTO BAD_EXIT

echo "npm run build:prod"
npm run build:prod

if %errorlevel% NEQ 0 GOTO BAD_EXIT

GOTO SMOOTH

:BAD_EXIT
echo BOO
exit /b 1


:SMOOTH
echo "OK."
exit /b 0
PROMPT="Docker Repo" DEF=nexus3.onap.org:10003 ;; AAF_FQDN) PROMPT="AAF's FQDN";; DEPLOY_FQI) PROMPT="Deployer's FQI";; AAF_FQDN_IP) # Need AAF_FQDN's IP, because not might not be available in mini-container PROMPT="AAF FQDN IP" DEF=$(host $AAF_FQDN | grep "has address" | tail -1 | cut -f 4 -d ' ') ;; APP_FQI) PROMPT="App's FQI";; APP_FQDN) PROMPT="App's Root FQDN";; VOLUME) PROMPT="APP's AAF Configuration Volume";; DRIVER) PROMPT=$V;DEF=local;; VERSION) PROMPT="CADI Version";DEF=$CADI_VERSION;; LATITUDE|LONGITUDE) PROMPT="$V of Node";; *) PROMPT=$V;; esac if [ "$DEF" = "" ]; then PROMPT="$PROMPT: " else PROMPT="$PROMPT ($DEF): " fi read -p "$PROMPT" VAR if [ "$VAR" = "" ]; then if [ "$DEF" = "" ]; then echo "agent.sh needs each value queried. Please start again." exit else VAR=$DEF fi fi echo "$V=$VAR" >> ./aaf.props fi done . ./aaf.props # Make sure Container Volume exists if [ "$(docker volume ls | grep ${VOLUME})" = "" ]; then echo -n "Creating Volume: " docker volume create -d ${DRIVER} ${VOLUME} fi docker run \ -it \ --rm \ --mount 'type=volume,src='${VOLUME}',dst=/opt/app/osaaf,volume-driver='${DRIVER} \ --add-host="$AAF_FQDN:$AAF_FQDN_IP" \ --env AAF_FQDN=${AAF_FQDN} \ --env DEPLOY_FQI=${DEPLOY_FQI} \ --env DEPLOY_PASSWORD=${DEPLOY_PASSWORD} \ --env APP_FQI=${APP_FQI} \ --env APP_FQDN=${APP_FQDN} \ --env LATITUDE=${LATITUDE} \ --env LONGITUDE=${LONGITUDE} \ --name aaf_agent_$USER \ $DOCKER_REPOSITORY/onap/aaf/aaf_agent:$VERSION \ /bin/bash "$@"