diff options
Diffstat (limited to 'integration/src/main/scripts/release')
-rwxr-xr-x | integration/src/main/scripts/release/releasePhase.sh | 12 | ||||
-rwxr-xr-x | integration/src/main/scripts/release/updateOomImages.sh | 3 | ||||
-rwxr-xr-x | integration/src/main/scripts/release/updateRefs.sh | 23 |
3 files changed, 28 insertions, 10 deletions
diff --git a/integration/src/main/scripts/release/releasePhase.sh b/integration/src/main/scripts/release/releasePhase.sh index 81a457e0..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 @@ -389,7 +394,8 @@ release_phase_15() { -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" \ 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 9e1231ad..45ec0652 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 ;; @@ -433,7 +438,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 |