summaryrefslogtreecommitdiffstats
path: root/csit/run-k8s-csit.sh
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2023-03-07 01:32:28 +0000
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2023-03-07 15:03:44 +0000
commitd8f918033221270c1ec4423b36c010da8464c401 (patch)
tree96c4b5db631594ec79de59e24e8338639293f95a /csit/run-k8s-csit.sh
parent6f8e0a9588483cf4f7abd231c704f7fd84070147 (diff)
Add helm charts for distribution and http-ppnt in CSIT
Issue-ID: POLICY-4542 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I18453af111dff7943c65c8b1113df0ded23b6f99
Diffstat (limited to 'csit/run-k8s-csit.sh')
-rwxr-xr-xcsit/run-k8s-csit.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh
index d84f7318..a987c112 100755
--- a/csit/run-k8s-csit.sh
+++ b/csit/run-k8s-csit.sh
@@ -34,12 +34,17 @@ POLICY_PAP_ROBOT="pap-test.robot"
POLICY_APEX_PDP_ROBOT="apex-pdp-test.robot"
POLICY_XACML_PDP_ROBOT="xacml-pdp-test.robot"
POLICY_DROOLS_PDP_ROBOT="drools-pdp-test.robot"
+POLICY_DISTRIBUTION_ROBOT="distribution-test.robot"
POLICY_API_CONTAINER="policy-api"
POLICY_PAP_CONTAINER="policy-pap"
POLICY_CLAMP_CONTAINER="policy-clamp-runtime-acm"
POLICY_APEX_CONTAINER="policy-apex-pdp"
POLICY_DROOLS_CONTAINER="policy-drools-pdp"
POLICY_XACML_CONTAINER="policy-xacml-pdp"
+POLICY_DISTRIBUTION_CONTAINER="policy-distribution"
+
+DISTRIBUTION_CSAR=${WORKSPACE}/csit/resources/tests/data/csar
+DIST_TEMP_FOLDER=/tmp/distribution
export PROJECT=""
export ROBOT_FILE=""
@@ -89,6 +94,9 @@ function build_robot_image () {
echo "Build docker image for robot framework"
cd ${WORKSPACE}/csit/resources || exit;
clone_models
+ if [ "${PROJECT}" == "distribution" ] || [ "${PROJECT}" == "policy-distribution" ]; then
+ copy_csar_file
+ fi
echo "Build robot framework docker image"
docker login -u docker -p docker nexus3.onap.org:10001
docker build . --file Dockerfile \
@@ -145,6 +153,15 @@ function clone_models () {
>tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.v2.json
}
+function copy_csar_file () {
+ zip -F ${DISTRIBUTION_CSAR}/sample_csar_with_apex_policy.csar \
+ --out ${DISTRIBUTION_CSAR}/csar_temp.csar -q
+ # Remake temp directory
+ sudo rm -rf "${DIST_TEMP_FOLDER}"
+ sudo mkdir "${DIST_TEMP_FOLDER}"
+ sudo cp ${DISTRIBUTION_CSAR}/csar_temp.csar ${DISTRIBUTION_CSAR}/temp.csar
+ sudo mv ${DISTRIBUTION_CSAR}/temp.csar ${DIST_TEMP_FOLDER}/sample_csar_with_apex_policy.csar
+}
function get_robot_file () {
case $PROJECT in
@@ -179,6 +196,12 @@ function get_robot_file () {
export READINESS_CONTAINERS=($POLICY_DROOLS_CONTAINER)
;;
+ distribution | policy-distribution)
+ export ROBOT_FILE=($POLICY_DISTRIBUTION_ROBOT)
+ export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER,
+ $POLICY_DISTRIBUTION_CONTAINER)
+ ;;
+
*)
echo "unknown project supplied"
;;