File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -440,17 +440,17 @@ container_release_file(){
440440 echo " INFO: $VERSION is already released for image $name , checking signature..."
441441 image_digest=$( docker inspect --format=' {{index .RepoDigests 0}}' \
442442 " $CONTAINER_PUSH_REGISTRY " /" $lfn_umbrella " /" $name " :" $VERSION " )
443- cosign verify --key " $COSIGN_PUBLIC_KEY " " $image_digest "
444- cosign_verified =$?
445- if [ " $cosign_verified " -eq 0 ]; then
443+ exit_code=0
444+ cosign verify --key " $COSIGN_PUBLIC_KEY " " $image_digest " || exit_code =$?
445+ if [ " $exit_code " -eq 0 ]; then
446446 echo " INFO: $name :$VERSION is already signed, continuing..."
447- elif [ " $cosign_verified " -eq 10 ] && [[ " $JOB_NAME " =~ " merge" ]]; then
447+ elif [ " $exit_code " -eq 10 ] && [[ " $JOB_NAME " =~ " merge" ]]; then
448448 # Exit code 10 indicates the package was found without signature
449449 echo " INFO: No signature found for $name :$VERSION . Attempting to sign..."
450450 export COSIGN_PASSWORD
451451 cosign sign -y --key " $COSIGN_PRIVATE_KEY " " $image_digest "
452452 else
453- echo " INFO: Could not verify signature, cosign exited with code $cosign_verified ."
453+ echo " INFO: Could not verify signature, cosign exited with code $exit_code ."
454454 fi
455455 else
456456 echo " INFO: $VERSION not found in releases, release will be prepared. Continuing..."
You can’t perform that action at this time.
0 commit comments