From 2dce44ed8a38122a130772676d4aed0278029e03 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Fri, 18 Sep 2020 13:15:51 -0700 Subject: [PATCH] retry uploading snap if we fail --- .azure-pipelines/templates/stages/deploy-stage.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/stages/deploy-stage.yml b/.azure-pipelines/templates/stages/deploy-stage.yml index 9fe49bd9e..f2f073416 100644 --- a/.azure-pipelines/templates/stages/deploy-stage.yml +++ b/.azure-pipelines/templates/stages/deploy-stage.yml @@ -58,7 +58,12 @@ stages: mkdir -p .snapcraft ln -s $(snapcraftCfg.secureFilePath) .snapcraft/snapcraft.cfg for SNAP_FILE in snap/*.snap; do - snapcraft upload --release=${{ parameters.snapReleaseChannel }} "${SNAP_FILE}" + for i in `seq 1 3`; + do + if snapcraft upload --release=${{ parameters.snapReleaseChannel }} "${SNAP_FILE}" ; then + break + fi + done done displayName: Publish to Snap store - job: publish_docker