File tree 1 file changed +16
-5
lines changed
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,9 @@ function run_build() {
315
315
push_images+=(" ${shadow_repository} /${image} :${version} " )
316
316
fi
317
317
318
+ # Singing image
319
+ codenotary_sign " ${CODENOTARY_OWNER} " " ${repository} /${image} :${version} "
320
+
318
321
# Push images
319
322
if bashio::var.true " ${DOCKER_PUSH} " ; then
320
323
for i in " ${push_images[@]} " ; do
@@ -333,9 +336,6 @@ function run_build() {
333
336
done
334
337
done
335
338
fi
336
-
337
- # Singing image
338
- codenotary_sign " ${CODENOTARY_OWNER} " " ${repository} /${image} :${version} "
339
339
}
340
340
341
341
@@ -694,6 +694,7 @@ function codenotary_sign() {
694
694
local trust=$1
695
695
local image=$2
696
696
local vcn_cli=()
697
+ local success=false
697
698
698
699
if bashio::var.false " ${DOCKER_PUSH} " || bashio::var.false " ${VCN_NOTARY} " ; then
699
700
return 0
@@ -705,8 +706,18 @@ function codenotary_sign() {
705
706
vcn_cli+=(" --org" " ${trust} " )
706
707
fi
707
708
708
- if ! vcn authenticate " ${vcn_cli[@]} " --silent " docker://${image} " ; then
709
- VCN_NOTARIZATION_PASSWORD=" ${CODENOTARY_PASSWORD} " vcn notarize --public " docker://${image} " || bashio::exit.nok " Failed to sign the image"
709
+ for j in {1..10}; do
710
+ if ! vcn authenticate " ${vcn_cli[@]} " --silent " docker://${image} " ; then
711
+ VCN_NOTARIZATION_PASSWORD=" ${CODENOTARY_PASSWORD} " vcn notarize --public " docker://${image} " || true
712
+ else
713
+ success=true
714
+ break
715
+ fi
716
+ sleep 5
717
+ done
718
+
719
+ if bashio::var.false " ${success} " ; then
720
+ bashio::exit.nok " Failed to sign the image"
710
721
fi
711
722
bashio::log.info " Signed ${image} with ${trust} "
712
723
}
You can’t perform that action at this time.
0 commit comments