blob: 7623f71f6bea31dd7b9d467ef99ef29c37df78e7 [file] [log] [blame]
Bartosz Gardziejewski03591ab2020-09-29 13:50:12 +02001#!/bin/bash
2#
3# Copyright 2016-2017 Huawei Technologies Co., Ltd.
4# Copyright 2020 Nokia.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT 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#
18# These scripts are sourced by run-csit.sh.
19
Bogumil Zebek49830cf2020-10-02 11:14:28 +020020REFREPO_IMAGE_TAG=latest \
Bartosz Gardziejewski03591ab2020-09-29 13:50:12 +020021POSTGRES_IMAGE_TAG=latest \
22NETWORK_DRIVER_MTU=1450 \
23docker-compose up -d
24
25DOCKER_IP=`get-docker-network-ip.sh`
26
27# Wait for Market place initialization
28echo Wait for VNF Repository initialization
29# Active waiting with healthcheck and max retry count
30MAX_RETRY=30
31TRY=1
32while (( $(curl -s -o /dev/null -w ''%{http_code}'' ${DOCKER_IP}:8702/onapapi/vnfsdk-marketplace/v1/PackageResource/healthcheck) != 200 )) && (($TRY < $MAX_RETRY)); do
33 sleep 4
34 TRY=$[$TRY+1]
35done
36
37# Get refrepo logs for easier debug in case of failure
38docker logs refrepo
39REFREPO_IP=`get-instance-ip.sh refrepo`
40
41# Pass any variables required by Robot test suites in ROBOT_VARIABLES
42ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v REPO_IP:${REFREPO_IP}"
43echo ${ROBOT_VARIABLES}