3 # Copyright (c) 2019 AT&T Intellectual Property. All other rights reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 CONTAINER_NAME="validation-ui"
20 TAG_PRE=`echo "${PWD##*/}"`
23 postgres_db_user_pwd=""
32 # get the architecture of the host
33 if [ "`uname -m`" = "aarch64" ]
40 KEY=$(echo $ARGUMENT | cut -f1 -d=)
41 VALUE=$(echo $ARGUMENT | cut -f2 -d=)
43 REGISTRY) REGISTRY=${VALUE} ;;
44 NAME) NAME=${VALUE} ;;
45 TAG_VER) TAG_VER=${VALUE} ;;
46 postgres_db_user_pwd) postgres_db_user_pwd=${VALUE} ;;
47 jenkins_url) jenkins_url=${VALUE} ;;
48 jenkins_user_name) jenkins_user_name=${VALUE} ;;
49 jenkins_user_pwd) jenkins_user_pwd=${VALUE} ;;
50 jenkins_job_name) jenkins_job_name=${VALUE} ;;
51 nexus_results_url) nexus_results_url=${VALUE} ;;
52 proxy_ip) proxy_ip=${VALUE} ;;
53 proxy_port) proxy_port=${VALUE} ;;
58 if [ -z "$postgres_db_user_pwd" ]
60 echo "ERROR: You must specify the postgresql root user password"
64 if [ -z "$jenkins_url" ]
66 echo "ERROR: You must specify the Jenkins Url"
70 if [ -z "$jenkins_user_name" ]
72 echo "ERROR: You must specify the Jenkins username"
76 if [ -z "$jenkins_user_pwd" ]
78 echo "ERROR: You must specify the Jenkins user password"
82 if [ -z "$jenkins_job_name" ]
84 echo "ERROR: You must specify the Jenkins job name"
88 if [ -z "$nexus_results_url" ]
90 echo "ERROR: You must specify the Nexus Url"
94 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$HOST_ARCH"-"$TAG_VER"
95 docker run --name $CONTAINER_NAME --network="host" -it --rm -e postgres_db_user_pwd="$postgres_db_user_pwd" -e jenkins_url="$jenkins_url" -e jenkins_user_name="$jenkins_user_name" -e jenkins_user_pwd="$jenkins_user_pwd" -e jenkins_job_name="$jenkins_job_name" -e nexus_results_url="$nexus_results_url" -e proxy_ip="$proxy_ip" -e proxy_port="$proxy_port" $IMAGE