diff options
author | 2022-07-29 13:35:49 +0100 | |
---|---|---|
committer | 2022-07-29 15:33:02 +0100 | |
commit | 2da18f6d0be535eb2ae0afc74b945a39ccd8d7a8 (patch) | |
tree | 35fff1d535af2f1927e53dd797d0e1abe240e219 /integration/src/main/scripts/release/updateRefs.sh | |
parent | 98fa7107c5d81bf2ec9623a77f4ba2ce1358e525 (diff) |
Update docker files base images to snapshots
Currently the policy base images used in docker files in master are hard
revisions of the policy base images. The docker files should use
snapshot policy base images when they are availabe and only change to
released base images at release time.
This commit ensures that the references are updated correctly in Docker
files to snapshots or released base policy images as appropriate
Issue-ID: POLICY-4287
Change-Id: I2c68e1bad6bde2e116c27678c88f8b40dc914b0f
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'integration/src/main/scripts/release/updateRefs.sh')
-rwxr-xr-x | integration/src/main/scripts/release/updateRefs.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/integration/src/main/scripts/release/updateRefs.sh b/integration/src/main/scripts/release/updateRefs.sh index 14f90d9a..059c46c0 100755 --- a/integration/src/main/scripts/release/updateRefs.sh +++ b/integration/src/main/scripts/release/updateRefs.sh @@ -404,10 +404,20 @@ 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*' - 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 + 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 + 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 + if [[ "$result_code" -eq 0 ]] then echo "docker base images updated on $repo_location/$target_repo" |