Merge "Add licenses to Dovetail scripts"
authorJun Li <matthew.lijun@huawei.com>
Mon, 26 Jun 2017 09:03:26 +0000 (09:03 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 26 Jun 2017 09:03:26 +0000 (09:03 +0000)
1  2 
jjb/dovetail/dovetail-run.sh

@@@ -1,4 -1,11 +1,11 @@@
  #!/bin/bash
+ ##############################################################################
+ # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+ # All rights reserved. This program and the accompanying materials
+ # are made available under the terms of the Apache License, Version 2.0
+ # which accompanies this distribution, and is available at
+ # http://www.apache.org/licenses/LICENSE-2.0
+ ##############################################################################
  
  #the noun INSTALLER is used in community, here is just the example to run.
  #multi-platforms are supported.
@@@ -7,12 -14,14 +14,12 @@@ set -
  [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
  
  DOVETAIL_HOME=${WORKSPACE}/cvp
 -if [ -d ${DOVETAIL_HOME} ]; then
 -    sudo rm -rf ${DOVETAIL_HOME}/*
 -else
 -    sudo mkdir -p ${DOVETAIL_HOME}
 -fi
 +[ -d ${DOVETAIL_HOME} ] && sudo rm -rf ${DOVETAIL_HOME}
 +
 +mkdir -p ${DOVETAIL_HOME}
  
  DOVETAIL_CONFIG=${DOVETAIL_HOME}/pre_config
 -sudo mkdir -p ${DOVETAIL_CONFIG}
 +mkdir -p ${DOVETAIL_CONFIG}
  
  sshkey=""
  # The path of openrc.sh is defined in fetch_os_creds.sh
@@@ -100,8 -109,7 +107,8 @@@ if [ "$INSTALLER_TYPE" == "fuel" ]; the
  fi
  
  # sdnvpn test case needs to download this image first before running
 -sudo wget -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG}
 +echo "Download image ubuntu-16.04-server-cloudimg-amd64-disk1.img ..."
 +wget -q -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG}
  
  opts="--privileged=true -id"