aboutsummaryrefslogtreecommitdiffstats
path: root/integration/src/release_scripts/releasePhase.sh
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-03-01 21:01:03 +0000
committerliamfallon <liam.fallon@est.tech>2022-03-01 21:05:54 +0000
commitd7d9a664cb6d45b1019f8ac897feac512e5b37e8 (patch)
treeaeda2f2c5b71e61abb81a086e69530b021be6f62 /integration/src/release_scripts/releasePhase.sh
parent006a229e166b5656fd9ba320e2b36d33c7e945a8 (diff)
Update release scripts for branches
Release scripts are updated: - Can now handle releasing on a branch for a maintenance release - startPhase.sh script updated to handle all 13 phases of the release process - Various corrections and bug fixes found during the release - scripts updated to comply with IntelliJ shekkcheck suggestions Issue-ID: POLICY-3835 Change-Id: Ibfa49e4132ca61ae0541600fae5f6814cdf7a409 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'integration/src/release_scripts/releasePhase.sh')
-rwxr-xr-xintegration/src/release_scripts/releasePhase.sh270
1 files changed, 249 insertions, 21 deletions
diff --git a/integration/src/release_scripts/releasePhase.sh b/integration/src/release_scripts/releasePhase.sh
index 26a4588e..b3f7e0af 100755
--- a/integration/src/release_scripts/releasePhase.sh
+++ b/integration/src/release_scripts/releasePhase.sh
@@ -22,7 +22,7 @@
set -e
-SCRIPT_NAME=`basename $0`
+SCRIPT_NAME=$(basename "$0")
repo_location="./"
release_data_file="./pf_release_data.csv"
@@ -129,11 +129,11 @@ fi
release_phase_1() {
echo "Updating parent references in the parent pom and generating commit . . ."
- updateRefs.sh -d $release_data_file -l $repo_location -r policy/parent -p
+ updateRefs.sh -d "$release_data_file" -l "$repo_location" -r policy/parent -p
generateCommit.sh \
- -l $repo_location \
+ -l "$repo_location" \
-r policy/parent \
- -i $issue_id \
+ -i "$issue_id" \
-e "update parent references in policy/parent pom" \
-m "updated the parent references in the policy/parent pom"
echo "Updated parent references in the parent pom and generated commit"
@@ -141,41 +141,240 @@ release_phase_1() {
release_phase_2() {
echo "Generating artifact release yaml file and commit for policy/parent . . ."
- releaseRepo.sh -d $release_data_file -l $repo_location -r policy/parent -i $issue_id
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/parent -i "$issue_id"
echo "Generated artifact release yaml file and commit for policy/parent"
}
release_phase_3() {
echo "Updating snapshots for policy/parent, updating references on policy/docker and policy/common . . ."
bumpSnapshots.sh \
- -d $release_data_file \
- -l $repo_location \
- -i $issue_id
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -i "$issue_id"
updateRefs.sh \
-p \
- -d $release_data_file \
- -l $repo_location \
- -r policy/docker
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/docker"
updateRefs.sh \
-p \
- -d $release_data_file \
- -l $repo_location \
- -r policy/common
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/common"
generateCommit.sh \
- -l $repo_location \
- -r policy/docker \
- -i $issue_id \
+ -l "$repo_location" \
+ -r "policy/docker" \
+ -i "$issue_id" \
-e "update parent references in policy/docker pom" \
-m "updated the parent references in the policy/docker pom"
generateCommit.sh \
- -l $repo_location \
- -r policy/common \
- -i $issue_id \
+ -l "$repo_location" \
+ -r "policy/common" \
+ -i "$issue_id" \
-e "update parent references in policy/common pom" \
-m "updated the parent references in the policy/common pom"
echo "Updated snapshots for policy/parent, updating references on policy/docker and policy/common"
}
+release_phase_4() {
+ echo "Generating artifact release yaml file and commit for policy/common . . ."
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/common -i "$issue_id"
+ echo "Generated artifact release yaml file and commit for policy/common"
+
+ echo "Generating docker release yaml file and commit for policy/docker . . ."
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/docker -i "$issue_id"
+ echo "Generated docker release yaml file and commit for policy/docker"
+}
+
+release_phase_5() {
+ echo "Updating snapshots for policy/common and policy/docker, updating references on policy/models . . ."
+ bumpSnapshots.sh \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -i "$issue_id"
+ updateRefs.sh \
+ -pc \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/models"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/models" \
+ -i "$issue_id" \
+ -e "update parent,common references in policy/models pom" \
+ -m "updated the parent and common references in the policy/models pom"
+ echo "Updated snapshots for policy/common and policy/docker, updated references on policy/models"
+}
+
+release_phase_6() {
+ echo "Generating artifact release yaml file and commit for policy/models . . ."
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/models -i "$issue_id"
+ echo "Generated artifact release yaml file and commit for policy/models"
+}
+
+release_phase_7() {
+ echo "Updating snapshots for policy/models, updating references on other repos . . ."
+ bumpSnapshots.sh \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -i "$issue_id"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/apex-pdp"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/api"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/clamp"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/distribution"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/drools-pdp"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/gui"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/pap"
+ updateRefs.sh \
+ -pcmk \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/xacml-pdp"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/apex-pdp" \
+ -i "$issue_id" \
+ -e "update references in policy/apex-pdp pom" \
+ -m "updated references in the policy/apex-pdp pom"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/api" \
+ -i "$issue_id" \
+ -e "update references in policy/api pom" \
+ -m "updated references in the policy/api pom"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/clamp" \
+ -i "$issue_id" \
+ -e "update references in policy/clamp pom" \
+ -m "updated references in the policy/clamp pom"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/distribution" \
+ -i "$issue_id" \
+ -e "update references in policy/distribution pom" \
+ -m "updated references in the policy/distribution pom"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/drools-pdp" \
+ -i "$issue_id" \
+ -e "update references in policy/drools-pdp pom" \
+ -m "updated references in the policy/drools-pdp pom"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/gui" \
+ -i "$issue_id" \
+ -e "update references in policy/gui pom" \
+ -m "updated references in the policy/gui pom"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/pap" \
+ -i "$issue_id" \
+ -e "update references in policy/pap pom" \
+ -m "updated references in the policy/pap pom"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/xacml-pdp" \
+ -i "$issue_id" \
+ -e "update references in policy/xacml-pdp pom" \
+ -m "updated references in the policy/xacml-pdp pom"
+ echo "Updated snapshots for policy/models, updated references on other repos"
+}
+
+release_phase_8() {
+ echo "Generating artifact release yaml file and commit for repos . . ."
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/apex-pdp -i "$issue_id"
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/api -i "$issue_id"
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/clamp -i "$issue_id"
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/distribution -i "$issue_id"
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/drools-pdp -i "$issue_id"
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/gui -i "$issue_id"
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/pap -i "$issue_id"
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/xacml-pdp -i "$issue_id"
+ echo "Generated artifact release yaml file and commit for repos"
+}
+
+release_phase_9() {
+ echo "Generating docker release yaml file and commit for repos . . ."
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/apex-pdp -i "$issue_id"
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/api -i "$issue_id"
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/clamp -i "$issue_id"
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/distribution -i "$issue_id"
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/drools-pdp -i "$issue_id"
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/gui -i "$issue_id"
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/pap -i "$issue_id"
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/xacml-pdp -i "$issue_id"
+ echo "Generated docker release yaml file and commit for repos"
+}
+
+release_phase_10() {
+ echo "Updating snapshots for repos, updating references on policy/drools-applications . . ."
+ bumpSnapshots.sh \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -i "$issue_id"
+ updateRefs.sh \
+ -pcmok \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -r "policy/drools-applications"
+ generateCommit.sh \
+ -l "$repo_location" \
+ -r "policy/drools-applications" \
+ -i "$issue_id" \
+ -e "update references in policy/drools-applications pom" \
+ -m "updated references in the policy/drools-applications pom"
+ echo "Updated snapshots for repos, updated references on policy/drools-applications"
+}
+
+release_phase_11() {
+ echo "Generating artifact release yaml file and commit for policy/drools-applications . . ."
+ releaseRepo.sh -d "$release_data_file" -l "$repo_location" -r policy/drools-applications -i "$issue_id"
+ echo "Generated artifact release yaml file and commit for policy/drools-applications"
+}
+
+release_phase_12() {
+ echo "Generating docker release yaml file and commit for policy/drools-applications . . ."
+ releaseRepoImages.sh -d "$release_data_file" -l "$repo_location" -r policy/drools-applications -i "$issue_id"
+ echo "Generated docker release yaml file and commit for policy/drools-applications"
+}
+
+release_phase_13() {
+ echo "Updating snapshots on policy/drools-applications . . ."
+ bumpSnapshots.sh \
+ -d "$release_data_file" \
+ -l "$repo_location" \
+ -i "$issue_id"
+}
+
case "$release_phase" in
1) release_phase_1
@@ -187,7 +386,36 @@ case "$release_phase" in
3) release_phase_3
;;
+4) release_phase_4
+ ;;
+
+5) release_phase_5
+ ;;
+
+6) release_phase_6
+ ;;
+
+7) release_phase_7
+ ;;
+
+8) release_phase_8
+ ;;
+
+9) release_phase_9
+ ;;
+
+10) release_phase_10
+ ;;
+
+11) release_phase_11
+ ;;
+
+12) release_phase_12
+ ;;
+
+13) release_phase_13
+ ;;
+
*) echo "specified release phase '$release_phase' is invalid"
;;
esac
-