summaryrefslogtreecommitdiffstats
path: root/compose
diff options
context:
space:
mode:
authorAdheli Tavares <adheli.tavares@est.tech>2024-02-28 12:38:48 +0000
committerGerrit Code Review <gerrit@onap.org>2024-02-28 12:38:48 +0000
commit5582cd406c8414919c4d5d7f5b116f4f1e5a971d (patch)
tree34c3099cc04d6827014282a2f3cbe5a0f9f844e4 /compose
parent8361cb0e3663a610a46bc5ea8a0cc783ade26f89 (diff)
parentb15eda6e03133862f071a6dc0127c3bc660aad1f (diff)
Merge "Add ACM regression test suite"
Diffstat (limited to 'compose')
-rw-r--r--compose/docker-compose.yml10
-rwxr-xr-xcompose/get-versions-regression.sh149
-rwxr-xr-xcompose/get-versions.sh3
3 files changed, 156 insertions, 6 deletions
diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml
index 5effc256..0264b290 100644
--- a/compose/docker-compose.yml
+++ b/compose/docker-compose.yml
@@ -266,7 +266,7 @@ services:
]
policy-clamp-ac-http-ppnt:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_VERSION}
+ image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_PPNT_VERSION}
container_name: policy-clamp-ac-http-ppnt
depends_on:
- kafka
@@ -283,7 +283,7 @@ services:
'kafka', '9092'
]
policy-clamp-ac-k8s-ppnt:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_VERSION}
+ image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_PPNT_VERSION}
container_name: policy-clamp-ac-k8s-ppnt
depends_on:
- kafka
@@ -300,7 +300,7 @@ services:
'kafka', '9092'
]
policy-clamp-ac-pf-ppnt:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_VERSION}
+ image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_PPNT_VERSION}
container_name: policy-clamp-ac-pf-ppnt
depends_on:
- kafka
@@ -319,7 +319,7 @@ services:
'api', '6969'
]
policy-clamp-ac-a1pms-ppnt:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-a1pms-ppnt:${POLICY_CLAMP_VERSION}
+ image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-a1pms-ppnt:${POLICY_CLAMP_PPNT_VERSION}
container_name: policy-clamp-ac-a1pms-ppnt
depends_on:
- kafka
@@ -336,7 +336,7 @@ services:
'kafka', '9092'
]
policy-clamp-ac-kserve-ppnt:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-kserve-ppnt:${POLICY_CLAMP_VERSION}
+ image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-kserve-ppnt:${POLICY_CLAMP_PPNT_VERSION}
container_name: policy-clamp-ac-kserve-ppnt
depends_on:
- kafka
diff --git a/compose/get-versions-regression.sh b/compose/get-versions-regression.sh
new file mode 100755
index 00000000..c4347481
--- /dev/null
+++ b/compose/get-versions-regression.sh
@@ -0,0 +1,149 @@
+#! /bin/bash
+
+# ============LICENSE_START====================================================
+# Copyright (C) 2024 Nordix Foundation. All rights reserved.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+
+function getDockerVersion
+{
+ REPO=${1}
+ GERRIT_BRANCH=${2}
+ DEFAULT_DOCKER_IMAGE_NAME=${3:-}
+ DEFAULT_DOCKER_IMAGE_VERSION=${4:-}
+
+ REPO_RELEASE_DATA=$(
+ curl -qL --silent \
+ "https://github.com/onap/policy-parent/raw/${GERRIT_BRANCH}/integration/src/main/resources/release/pf_release_data.csv" |
+ grep "^policy/$REPO"
+ )
+
+ # shellcheck disable=SC2034
+ read -r repo \
+ latest_released_tag \
+ latest_snapshot_tag \
+ changed_files \
+ docker_images \
+ <<< "$(echo "$REPO_RELEASE_DATA" | tr ',' ' ' )"
+
+ if [[ -z "$docker_images" ]]
+ then
+ if [[ -z "$DEFAULT_DOCKER_IMAGE_NAME" ]]
+ then
+ echo "repo $REPO does not produce a docker image, execution terminated"
+ exit 1
+ else
+ docker_images="$DEFAULT_DOCKER_IMAGE_NAME"
+ fi
+ fi
+
+ # docker_image_version=$(echo "$latest_snapshot_tag" | awk -F \. '{print $1"."$2"-SNAPSHOT-latest"}')
+ docker_image_version=$latest_snapshot_tag
+ docker_image_name=$(echo "$docker_images" | sed -e "s/^.*://" -e "s/^.//" -e "s/.$//")
+
+ if \
+ curl -qL --silent \
+ "https://nexus3.onap.org/service/rest/repository/browse/docker.snapshot/v2/onap/$docker_image_name/tags/" |
+ grep -q "$docker_image_version"
+ then
+ echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+ return
+ fi
+
+ docker_image_version="$latest_released_tag"
+ if \
+ curl -qL --silent \
+ "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+ grep -q "$docker_image_version"
+ then
+ echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+ return
+ fi
+
+ docker_image_version="$DEFAULT_DOCKER_IMAGE_VERSION"
+ if \
+ curl -qL --silent \
+ "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+ grep -q "$docker_image_version"
+ then
+ echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+ return
+ else
+ echo "docker image \"$docker_image_name:$docker_image_version\" not found for repo \"$repo\""
+ exit 1
+ fi
+}
+
+
+if [ -z "${WORKSPACE}" ]; then
+ WORKSPACE=$(git rev-parse --show-toplevel)
+ export WORKSPACE
+fi
+
+if [ $# -eq 0 ]; then
+ echo "No release versions provided. Fetching the default version for ACM and participants"
+ echo "Usage: $0 <acm_release> <participant_release> ..."
+ ACM_RELEASE=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+ "${WORKSPACE}"/.gitreview)
+ PPNT_RELEASE=$ACM_RELEASE
+fi
+if [ $1 ]; then
+ ACM_RELEASE=$1
+fi
+
+if [ $2 ]; then
+ PPNT_RELEASE=$2
+fi
+
+export POLICY_MARIADB_VER=10.10.2
+echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER}
+
+export POLICY_POSTGRES_VER=11.1
+echo POLICY_POSTGRES_VER=${POLICY_POSTGRES_VER}
+
+getDockerVersion models $ACM_RELEASE "'policy-models-simulator'" 3.0.1
+export POLICY_MODELS_VERSION="$docker_image_version"
+
+getDockerVersion docker $ACM_RELEASE
+export POLICY_DOCKER_VERSION="$docker_image_version"
+
+getDockerVersion api $ACM_RELEASE
+export POLICY_API_VERSION="$docker_image_version"
+
+getDockerVersion pap $ACM_RELEASE
+export POLICY_PAP_VERSION="$docker_image_version"
+
+getDockerVersion apex-pdp $ACM_RELEASE
+export POLICY_APEX_PDP_VERSION="$docker_image_version"
+
+getDockerVersion clamp $ACM_RELEASE
+export POLICY_CLAMP_VERSION="$docker_image_version"
+
+getDockerVersion clamp $PPNT_RELEASE
+export POLICY_CLAMP_PPNT_VERSION="$docker_image_version"
+
+getDockerVersion drools-pdp $ACM_RELEASE
+export POLICY_DROOLS_PDP_VERSION="$docker_image_version"
+
+getDockerVersion xacml-pdp $ACM_RELEASE
+export POLICY_XACML_PDP_VERSION="$docker_image_version"
+
+getDockerVersion distribution $ACM_RELEASE
+export POLICY_DISTRIBUTION_VERSION="$docker_image_version"
+
+getDockerVersion drools-applications $ACM_RELEASE
+export POLICY_DROOLS_APPS_VERSION="$docker_image_version"
diff --git a/compose/get-versions.sh b/compose/get-versions.sh
index 2c11f0e1..13dc3653 100755
--- a/compose/get-versions.sh
+++ b/compose/get-versions.sh
@@ -2,7 +2,7 @@
# ============LICENSE_START====================================================
# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
-# Modification Copyright 2021-2023 Nordix Foundation.
+# Modification Copyright 2021-2024 Nordix Foundation.
# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
# =============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -130,6 +130,7 @@ export POLICY_DISTRIBUTION_VERSION="$docker_image_version"
getDockerVersion clamp
export POLICY_CLAMP_VERSION="$docker_image_version"
+export POLICY_CLAMP_PPNT_VERSION=$POLICY_CLAMP_VERSION
getDockerVersion gui
export POLICY_GUI_VERSION="$docker_image_version"