chore(): Adds logging credentials if existent
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elia el Lazkani 2023-07-04 19:18:15 +02:00
parent 8be346259b
commit 720bb64266

View file

@ -12,6 +12,18 @@ report_digest=$(echo "$image_information" | tail -n1 | awk -F ' ' '{print $2}')
#printf "$report_digest\n" #printf "$report_digest\n"
printf "Found digests for scan report...\n" printf "Found digests for scan report...\n"
extra_vars=""
if [[ -v REGISTRY_USERNAME ]]
then
extra_vars="$extra_vars --username $REGISTRY_USERNAME"
fi
if [[ -v REGISTRY_PASSWORD ]]
then
extra_vars="$extra_vars --password $REGISTRY_PASSWORD"
fi
image_base=$(echo "$image" | awk -F ':' '{print $1}') image_base=$(echo "$image" | awk -F ':' '{print $1}')
printf "Pulling $image_base:@$report_digest...\n" printf "Pulling $image_base:@$report_digest...\n"
oras pull "$image_base:@$report_digest" oras pull "$extra_vars" "$image_base:@$report_digest"