summaryrefslogtreecommitdiffstats
path: root/integration
diff options
context:
space:
mode:
Diffstat (limited to 'integration')
-rw-r--r--integration/pom.xml26
-rw-r--r--integration/src/main/resources/release/pf_release_data.csv26
-rwxr-xr-xintegration/src/main/scripts/release/getReleaseData.sh1
-rwxr-xr-xintegration/src/main/scripts/release/releasePhase.sh27
-rwxr-xr-xintegration/src/main/scripts/release/updateOomImages.sh3
-rwxr-xr-xintegration/src/main/scripts/release/updateRefs.sh76
6 files changed, 113 insertions, 46 deletions
diff --git a/integration/pom.xml b/integration/pom.xml
index 25a2b649..195eb62c 100644
--- a/integration/pom.xml
+++ b/integration/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.policy.parent</groupId>
<artifactId>policy-parent</artifactId>
- <version>3.6.0-SNAPSHOT</version>
+ <version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>integration</artifactId>
<packaging>pom</packaging>
@@ -36,13 +36,13 @@
<properties>
<java.version>11</java.version>
- <!-- NOTE: For RELEASE/SNAPSHOT always set to the project version -->
- <version.parent.resources>3.5.3</version.parent.resources>
- <version.logback>1.2.10</version.logback>
+ <!-- Note Well: For RELEASE/SNAPSHOT always set to the project version -->
+ <version.parent.resources>3.6.1-SNAPSHOT</version.parent.resources>
+ <version.logback>1.2.11</version.logback>
<version.dmaap>1.1.12</version.dmaap>
<version.powermock>2.0.9</version.powermock>
<version.eclipselink>2.7.8</version.eclipselink>
- <version.drools>7.68.0.Final</version.drools>
+ <version.drools>7.73.0.Final</version.drools>
<version.jersey>2.33</version.jersey>
<version.jackson>2.12.6</version.jackson>
<version.jackson.databind>2.12.6.1</version.jackson.databind>
@@ -63,7 +63,7 @@
<version.jakarta-api>2.0.2</version.jakarta-api>
<version.io.micrometer>1.7.3</version.io.micrometer>
<version.io.prometheus>0.11.0</version.io.prometheus>
- <version.postgres>42.3.3</version.postgres>
+ <version.postgres>42.5.0</version.postgres>
<version.kafka>3.0.0</version.kafka>
<jacoco.dataFile>${project.basedir}/../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
<repo.npm>https://nexus3.onap.org/repository/npm.public/npm/-/</repo.npm>
@@ -990,6 +990,20 @@
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <versionRange>3.0.0,)</versionRange>
+ <goals>
+ <goal>bundle</goal>
+ <goal>process</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<versionRange>[0.7.1.201405082137,)</versionRange>
diff --git a/integration/src/main/resources/release/pf_release_data.csv b/integration/src/main/resources/release/pf_release_data.csv
index d81156f7..704a5a8d 100644
--- a/integration/src/main/resources/release/pf_release_data.csv
+++ b/integration/src/main/resources/release/pf_release_data.csv
@@ -1,14 +1,14 @@
Repo, Last Tag Version,Snapshot Version,Changed Files,Docker Images
-policy/parent,3.5.3,3.6.0-SNAPSHOT,71,
-policy/docker,2.4.3,2.5.0-SNAPSHOT,4,'policy-jre-alpine':'policy-jdk-alpine':'policy-db-migrator'
-policy/common,1.10.3,1.11.0-SNAPSHOT,1,
-policy/models,2.6.4,2.7.0-SNAPSHOT,4,'policy-models-simulator'
-policy/api,2.6.3,2.7.0-SNAPSHOT,4,'policy-api'
-policy/pap,2.6.3,2.7.0-SNAPSHOT,4,'policy-pap'
-policy/apex-pdp,2.7.3,2.8.0-SNAPSHOT,4,'policy-apex-pdp'
-policy/drools-pdp,1.10.3,1.11.0-SNAPSHOT,1,'policy-drools'
-policy/xacml-pdp,2.6.3,2.7.0-SNAPSHOT,14,'policy-xacml-pdp'
-policy/distribution,2.7.3,2.8.0-SNAPSHOT,20,'policy-distribution'
-policy/clamp,6.2.3,6.3.0-SNAPSHOT,62,'policy-clamp-backend':'policy-clamp-ac-pf-ppnt':'policy-clamp-ac-k8s-ppnt':'policy-clamp-ac-http-ppnt':'policy-clamp-runtime-acm'
-policy/gui,2.2.3,2.3.0-SNAPSHOT,9,'policy-gui'
-policy/drools-applications,1.10.3,1.11.0-SNAPSHOT,1,'policy-pdpd-cl'
+policy/parent,3.6.0,3.6.1-SNAPSHOT,0,
+policy/docker,2.5.0,2.5.1-SNAPSHOT,1,'policy-jre-alpine':'policy-jdk-alpine':'policy-db-migrator'
+policy/common,1.11.0,1.11.1-SNAPSHOT,0,
+policy/models,2.7.0,2.7.1-SNAPSHOT,2,'policy-models-simulator'
+policy/api,2.7.0,2.7.1-SNAPSHOT,1,'policy-api'
+policy/pap,2.7.0,2.7.1-SNAPSHOT,1,'policy-pap'
+policy/apex-pdp,2.8.0,2.8.1-SNAPSHOT,1,'policy-apex-pdp'
+policy/drools-pdp,1.11.0,1.11.1-SNAPSHOT,1,'policy-drools'
+policy/xacml-pdp,2.7.0,2.7.1-SNAPSHOT,1,'policy-xacml-pdp'
+policy/distribution,2.8.0,2.8.1-SNAPSHOT,1,'policy-distribution'
+policy/clamp,6.3.0,6.3.1-SNAPSHOT,5,'policy-clamp-backend':'policy-clamp-ac-pf-ppnt':'policy-clamp-ac-k8s-ppnt':'policy-clamp-ac-http-ppnt':'policy-clamp-runtime-acm':'policy-clamp-acm-element-impl'
+policy/gui,2.3.0,2.3.1-SNAPSHOT,1,'policy-gui'
+policy/drools-applications,1.11.0,1.11.1-SNAPSHOT,0,'policy-pdpd-cl'
diff --git a/integration/src/main/scripts/release/getReleaseData.sh b/integration/src/main/scripts/release/getReleaseData.sh
index ff0df042..4ebcdb62 100755
--- a/integration/src/main/scripts/release/getReleaseData.sh
+++ b/integration/src/main/scripts/release/getReleaseData.sh
@@ -118,6 +118,7 @@ update_repos() {
for repo in "${pf_repos[@]}"
do
+ echo ""
echo "updating data from repo $repo branch $branch to data file '$release_data_file' . . ."
if [ -d "$repo_location/$repo" ]
diff --git a/integration/src/main/scripts/release/releasePhase.sh b/integration/src/main/scripts/release/releasePhase.sh
index 652bf007..789e7f18 100755
--- a/integration/src/main/scripts/release/releasePhase.sh
+++ b/integration/src/main/scripts/release/releasePhase.sh
@@ -24,7 +24,8 @@ set -e
SCRIPT_NAME=$(basename "$0")
repo_location="./"
-release_data_file="./pf_release_data.csv"
+release_data_file="pf_release_data.csv"
+release_data_file_tag=""
usage()
{
@@ -40,6 +41,7 @@ usage()
echo " defaults to '$repo_location'"
echo " -i issue-id - issue ID in the format POLICY-nnnn"
echo " -p phase - the release phase, a positive integer"
+ echo " -t tag - tag the release data file with the given tag"
echo ""
echo " examples:"
echo " $SCRIPT_NAME -l /home/user/onap -d /home/user/data/pf_release_data.csv -i POLICY-1234 -p 3"
@@ -48,7 +50,7 @@ usage()
exit 255;
}
-while getopts "hd:l:i:p:" opt
+while getopts "hd:l:i:p:t:" opt
do
case $opt in
h)
@@ -66,6 +68,9 @@ do
p)
release_phase=$OPTARG
;;
+ t)
+ release_data_file_tag="$OPTARG"
+ ;;
\?)
usage
exit 1
@@ -193,7 +198,7 @@ release_phase_5() {
-l "$repo_location" \
-i "$issue_id"
updateRefs.sh \
- -pc \
+ -pck \
-d "$release_data_file" \
-l "$repo_location" \
-r "policy/models"
@@ -374,23 +379,30 @@ release_phase_13() {
}
release_phase_14() {
- echo "Updating snapshots on policy/drools-applications, policy/gui and updating release data file . . ."
+ echo "Updating snapshots on policy/drools-applications and policy/gui . . ."
bumpSnapshots.sh \
-d "$release_data_file" \
-l "$repo_location" \
-i "$issue_id"
+ echo "Updated snapshots on policy/drools-applications and policy/gui"
+}
+
+
+release_phase_15() {
+ echo "Updating release data file . . ."
updateRefs.sh \
-f \
-d "$release_data_file" \
-l "$repo_location" \
- -r "policy/parent"
+ -r "policy/parent" \
+ -t "$release_data_file_tag"
generateCommit.sh \
-l "$repo_location" \
-r "policy/parent" \
-i "$issue_id" \
-e "update release data in policy/parent" \
-m "updated release data in policy/parent"
- echo "Updated snapshots on policy/drools-applications, policy/gui and updated release data file"
+ echo "Updated release data file"
}
case "$release_phase" in
@@ -437,6 +449,9 @@ case "$release_phase" in
14) release_phase_14
;;
+15) release_phase_15
+ ;;
+
*) echo "specified release phase '$release_phase' is invalid"
;;
esac
diff --git a/integration/src/main/scripts/release/updateOomImages.sh b/integration/src/main/scripts/release/updateOomImages.sh
index ad337a8c..7d8d9826 100755
--- a/integration/src/main/scripts/release/updateOomImages.sh
+++ b/integration/src/main/scripts/release/updateOomImages.sh
@@ -156,7 +156,7 @@ do
continue
fi
- for docker_image in $(echo "$docker_images" | tr ':' ' ')
+ for docker_image in $(echo "$docker_images" | sed -e "s/'//g" -e "s/:/ /g")
do
new_image="$docker_image:$latest_released_tag"
@@ -170,7 +170,6 @@ do
done
done
-
echo "generating OOM commit to update policy framework docker image versions . . ."
generateCommit.sh \
diff --git a/integration/src/main/scripts/release/updateRefs.sh b/integration/src/main/scripts/release/updateRefs.sh
index 059c46c0..9ca92e22 100755
--- a/integration/src/main/scripts/release/updateRefs.sh
+++ b/integration/src/main/scripts/release/updateRefs.sh
@@ -24,7 +24,8 @@ set -e
SCRIPT_NAME=$(basename "$0")
repo_location="./"
-release_data_file="./pf_release_data.csv"
+release_data_file="pf_release_data.csv"
+release_data_file_tag=""
# Use the bash internal OSTYPE variable to check for MacOS
if [[ "$OSTYPE" == "darwin"* ]]
@@ -55,6 +56,7 @@ usage()
echo " -x - update policy/apex-pdp references"
echo " -k - update docker base images in Dockerfiles"
echo " -f - update release data in policy parent"
+ echo " -t tag - tag the release data file with the given tag"
echo " -s - update release references to snapshot references,"
echo " if omitted, snapshot references are updated to release references"
echo ""
@@ -78,7 +80,7 @@ update_snapshot=false
update_docker=false
update_file=false
-while getopts "hd:l:r:pcmoxkfs" opt
+while getopts "hd:l:r:pcmoxkft:s" opt
do
case $opt in
h)
@@ -114,6 +116,9 @@ do
f)
update_file=true
;;
+ t)
+ release_data_file_tag="$OPTARG"_
+ ;;
s)
update_snapshot=true
;;
@@ -244,8 +249,8 @@ then
major_version=$(echo "$parent_latest_released_tag" | $SED -E 's/^([0-9]*)\.[0-9]*\.[0-9]*$/\1/')
minor_version=$(echo "$parent_latest_released_tag" | $SED -E 's/^[0-9]*\.([0-9]*)\.[0-9]*$/\1/')
patch_version=$(echo "$parent_latest_released_tag" | $SED -E 's/^[0-9]*\.[0-9]*\.([0-9]*)$/\1/')
- new_patch_version=$(("$patch_version"+1))
+ new_patch_version=$((patch_version+1))
new_snapshot_tag="$major_version"."$minor_version"."$new_patch_version"-SNAPSHOT
echo updating policy parent reference to "$new_snapshot_tag" on "$repo_location/$target_repo" . . .
@@ -401,21 +406,46 @@ fi
if [ "$update_docker" = true ] && [ "$target_docker_images" != "" ]
then
- echo "updating docker base images to version $docker_latest_released_tag on repo $repo_location/$target_repo . . ."
- find "$repo_location/$target_repo" \
- -name '*Docker*'
-
- if [ "$update_snapshot" == true ]
+ if [ "$specified_repo" = "policy/docker" ]
then
- find "$repo_location/$target_repo" \
- -name '*Docker*' \
- -exec $SED -r -i "s/^(FROM onap\/policy-j[d|r][k|e]-alpine:)[0-9]*.[0-9]*.[0-9]*$/\1$docker_latest_snapshot_tag/" {} \;
- result_code=$?
+ if [ "$update_snapshot" = true ]
+ then
+ major_version=$(echo "$docker_latest_released_tag" | $SED -E 's/^([0-9]*)\.[0-9]*\.[0-9]*$/\1/')
+ minor_version=$(echo "$docker_latest_released_tag" | $SED -E 's/^[0-9]*\.([0-9]*)\.[0-9]*$/\1/')
+ patch_version=$(echo "$docker_latest_released_tag" | $SED -E 's/^[0-9]*\.[0-9]*\.([0-9]*)$/\1/')
+
+ new_patch_version=$((patch_version+1))
+ new_snapshot_tag="$major_version"."$minor_version"."$new_patch_version"-SNAPSHOT
+
+ echo "updating docker base images to version $new_snapshot_tag on repo $repo_location/$target_repo . . ."
+ find "$repo_location/$target_repo" \
+ -name '*Docker*' \
+ -exec $SED -r -i "s/^(FROM onap\/policy-j[d|r][k|e]-alpine:)[0-9]*.[0-9]*.[0-9].*$/\1$new_snapshot_tag/" {} \;
+ result_code=$?
+ else
+ next_release_version=${docker_latest_snapshot_tag%-*}
+
+ echo "updating docker base images to version $next_release_version on repo $repo_location/$target_repo . . ."
+ find "$repo_location/$target_repo" \
+ -name '*Docker*' \
+ -exec $SED -r -i "s/^(FROM onap\/policy-j[d|r][k|e]-alpine:)[0-9]*.[0-9]*.[0-9].*$/\1$next_release_version/" {} \;
+ result_code=$?
+ fi
else
- find "$repo_location/$target_repo" \
- -name '*Docker*' \
- -exec $SED -r -i "s/^(FROM onap\/policy-j[d|r][k|e]-alpine:)[0-9]*.[0-9]*.[0-9]*$/\1$docker_latest_released_tag/" {} \;
- result_code=$?
+ if [ "$update_snapshot" == true ]
+ then
+ echo "updating docker base images to version $docker_latest_snapshot_tag on repo $repo_location/$target_repo . . ."
+ find "$repo_location/$target_repo" \
+ -name '*Docker*' \
+ -exec $SED -r -i "s/^(FROM onap\/policy-j[d|r][k|e]-alpine:)[0-9]*.[0-9]*.[0-9].*$/\1$docker_latest_snapshot_tag/" {} \;
+ result_code=$?
+ else
+ echo "updating docker base images to version $docker_latest_released_tag on repo $repo_location/$target_repo . . ."
+ find "$repo_location/$target_repo" \
+ -name '*Docker*' \
+ -exec $SED -r -i "s/^(FROM onap\/policy-j[d|r][k|e]-alpine:)[0-9]*.[0-9]*.[0-9].*$/\1$docker_latest_released_tag/" {} \;
+ result_code=$?
+ fi
fi
if [[ "$result_code" -eq 0 ]]
@@ -435,7 +465,15 @@ then
exit 1
fi
- echo "updating release data at $repo_location/$target_repo/integration/src/main/resources/release . . ."
- cp "$release_data_file" "$repo_location/$target_repo"/integration/src/main/resources/release
- echo "updated release data at $repo_location/$target_repo/integration/src/main/resources/release"
+ release_data_file_name="$release_data_file_tag$release_data_file"
+
+ echo \
+ "updating release data at" \
+ "$repo_location/$target_repo/integration/src/main/resources/release/$release_data_file_name"
+ cp \
+ "$release_data_file" \
+ "$repo_location/$target_repo/integration/src/main/resources/release/$release_data_file_name"
+ echo \
+ "updated release data at" \
+ "$repo_location/$target_repo/integration/src/main/resources/release/$release_data_file_name"
fi