kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright 2019 © Samsung Electronics Co., Ltd. |
| 4 | # |
| 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 |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 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. |
| 16 | # |
| 17 | |
kaihlavi | 3c5cac1 | 2019-06-28 09:12:07 +0300 | [diff] [blame] | 18 | echo "This is ${WORKSPACE}/scripts/sdc-dcae-d/setup_sdc_dcaed.sh" |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 19 | |
Petr Ospalý | b86853b | 2019-09-23 17:01:09 +0200 | [diff] [blame] | 20 | # I am leaving this here for explicity - but the same is already set inside setup sdc... |
| 21 | export ENV_NAME='CSIT' |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 22 | |
Petr Ospalý | b86853b | 2019-09-23 17:01:09 +0200 | [diff] [blame] | 23 | # run sdc deployment |
| 24 | set -- # to wipe out arguments... |
| 25 | source ${WORKSPACE}/scripts/sdc/setup_sdc_for_sanity.sh |
| 26 | export ROBOT_VARIABLES |
| 27 | |
| 28 | # fail quick if error |
| 29 | set -exo pipefail |
| 30 | |
| 31 | # prepare dcae-d |
| 32 | mkdir -p "${WORKSPACE}/data/clone/" |
| 33 | cd "${WORKSPACE}/data/clone" |
| 34 | git clone --depth 1 "https://gerrit.onap.org/r/sdc/dcae-d/dt-be-main" |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 35 | |
| 36 | # set enviroment variables |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 37 | source ${WORKSPACE}/data/clone/dt-be-main/version.properties |
| 38 | export DCAE_RELEASE=$major.$minor-STAGING-latest |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 39 | |
kaihlavi | 3c5cac1 | 2019-06-28 09:12:07 +0300 | [diff] [blame] | 40 | cp ${WORKSPACE}/data/clone/dt-be-main/docker/scripts/docker_run.sh ${WORKSPACE}/scripts/sdc-dcae-d/dcaed_docker_run.sh |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 41 | |
kaihlavi | 3c5cac1 | 2019-06-28 09:12:07 +0300 | [diff] [blame] | 42 | ${WORKSPACE}/scripts/sdc-dcae-d/dcaed_docker_run.sh -r ${DCAE_RELEASE} -e ${ENV_NAME} -p 10001 |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 43 | |
Petr Ospalý | b86853b | 2019-09-23 17:01:09 +0200 | [diff] [blame] | 44 | # This file is sourced in another script which is out of our control... |
| 45 | set +e |
| 46 | set +o pipefail |
kaihlavi | d1a1fb7 | 2019-06-13 16:11:48 +0300 | [diff] [blame] | 47 | |