Skip to content

Commit cf5de9c

Browse files
authored
Retry build files task in cg.yml (#14043)
* Retry build files.
1 parent 4aadfda commit cf5de9c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Build/cg/cg.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,20 @@ extends:
9898
- script: mkdir $(Build.ArtifactStagingDirectory)\Extension
9999
displayName: Create Extension Staging Directory
100100

101-
- script: yarn run vsix-prepublish
101+
- task: Bash@3
102102
displayName: Build files
103-
workingDirectory: $(Build.SourcesDirectory)\Extension
103+
inputs:
104+
targetType: 'inline'
105+
script: |
106+
export SRC_DIR=$(echo $BUILD_SOURCESDIRECTORY | sed 's|\\|/|g')
107+
cd "$SRC_DIR/Extension"
108+
yarn run vsix-prepublish
109+
if [ $? -ne 0 ]; then
110+
echo "yarn run vsix-prepublish failed, sleeping for 30s before retrying..."
111+
sleep 30
112+
exit 1
113+
fi
114+
retryCountOnTaskFailure: 3
104115

105116
- script: |
106117
cd $(Build.SourcesDirectory)\Extension

0 commit comments

Comments
 (0)