diff options
author | liamfallon <liam.fallon@est.tech> | 2022-09-08 16:58:30 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-09-08 16:58:34 +0100 |
commit | 6214bfb8b261e8325e3ae3a063ccf7c6f68f7605 (patch) | |
tree | 95cd482c3beb73f062e69fb8ff5fc44902573046 /integration/src/main/scripts | |
parent | 18a9ae57de6ba8fed4f8a4d1a1ba5302b5527e8b (diff) |
Fix small bugs in release scripts
- Correct handling of snapshots on Docker files
- Extra phase for submitting the release data
- Spacing on printouts
Issue-ID: POLICY-4333
Change-Id: I359942f91045bcdb7845cdf70fe7b1e55f6fd08a
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'integration/src/main/scripts')
-rwxr-xr-x | integration/src/main/scripts/release/getReleaseData.sh | 1 | ||||
-rwxr-xr-x | integration/src/main/scripts/release/releasePhase.sh | 15 | ||||
-rwxr-xr-x | integration/src/main/scripts/release/updateRefs.sh | 12 |
3 files changed, 18 insertions, 10 deletions
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..81a457e0 100755 --- a/integration/src/main/scripts/release/releasePhase.sh +++ b/integration/src/main/scripts/release/releasePhase.sh @@ -193,7 +193,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,11 +374,17 @@ 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" \ @@ -390,7 +396,7 @@ release_phase_14() { -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 +443,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/updateRefs.sh b/integration/src/main/scripts/release/updateRefs.sh index 059c46c0..9e1231ad 100755 --- a/integration/src/main/scripts/release/updateRefs.sh +++ b/integration/src/main/scripts/release/updateRefs.sh @@ -244,8 +244,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,20 +401,18 @@ 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 ] 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/" {} \; + -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/" {} \; + -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 |