3 ##############################################################################
4 # Copyright (c) 2019 AT&T, ENEA Nokia and others #
6 # Licensed under the Apache License, Version 2.0 (the "License"); #
7 # you maynot use this file except in compliance with the License. #
9 # You may obtain a copy of the License at #
10 # http://www.apache.org/licenses/LICENSE-2.0 #
12 # Unless required by applicable law or agreed to in writing, software #
13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15 # See the License for the specific language governing permissions and #
16 # limitations under the License. #
17 ##############################################################################
19 if [ -z "$AKRAINO_HOME" ]
21 echo "AKRAINO_HOME not available. Setting..."
22 this_file="$(readlink -f $0)"
23 bluval_dir="$(dirname $this_file)"
24 validation_dir="$(dirname $bluval_dir)"
25 parent_dir="$(dirname $validation_dir)"
26 export AKRAINO_HOME="$parent_dir"
28 echo "AKRAINO_HOME=$AKRAINO_HOME"
32 echo 'Usage: sh blucon.sh [OPTIONS] BLUEPRINT
34 Invokes blucon.py and passes parameters as it is.
35 You can pass all the parameters blucon.py accepts,
36 and as of now here is the list
42 --help Show this message and exit.'
47 echo "Building docker image"
48 image_tag=$( (git branch || echo "* local") | grep "^\*" | awk '{print $2}')
49 docker build -t akraino/validation:blucon-$image_tag $AKRAINO_HOME/validation/bluval
54 -v /var/run/docker.sock:/var/run/docker.sock \
55 -v /usr/bin/docker:/usr/bin/docker \
56 -v $AKRAINO_HOME/results:/opt/akraino/results \
57 -v $AKRAINO_HOME/validation:/opt/akraino/validation \
58 akraino/validation:blucon-$image_tag "$@"