Revision 1968ec86fdb6f632c2770979cd677ff86246bdf0 authored by Alain Mebsout on 04 July 2023, 13:20:44 UTC, committed by Alain Mebsout on 04 July 2023, 13:20:44 UTC
This fixes an issue occurring in the scenario:
- The L1 node is down for 1 hour
- The L1 node is back up for a bit
- The L1 node is down for a few seconds
The second time, the rollup node would have waited ~1h to reconnect.
1 parent 0eaebb7
Raw File
docker_registry_tag.sh
#!/bin/sh

set -e

ci_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
script_dir="$(dirname "$ci_dir")"
src_dir="$(dirname "$script_dir")"
cd "$src_dir"

. "$ci_dir"/docker_registry.inc.sh

username="$1"
password="$2"
reponame="${3##registry.gitlab.com/}"
old_tag="$4"
new_tag="$5"

token="$(getBearerToken "${username}" "${password}" "${reponame}")"
if [ -z "$token" ]; then
    echo "Failed to fetch the Bearer token"
    exit 1
fi

renameTag "$token" "$reponame" "$old_tag" "$new_tag"
back to top