File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,27 @@ extends:
9898 - script : mkdir $(Build.ArtifactStagingDirectory)\Extension
9999 displayName : Create Extension Staging Directory
100100
101- - task : Bash@3
102- displayName : Build files
103- inputs :
104- targetType : ' inline'
105- script : |
106- cd $(Build.SourcesDirectory)/Extension
101+ - bash : |
102+ TRY_COUNT=3
103+ EXIT_CODE=1
104+ for attempt in $(seq 1 $TRY_COUNT); do
107105 yarn run vsix-prepublish
108- retryCountOnTaskFailure : 3
106+ EXIT_CODE=$?
107+ if [ $EXIT_CODE -eq 0 ]; then
108+ break
109+ fi
110+ if [ $attempt -lt $TRY_COUNT ]; then
111+ echo "Attempt $attempt/$TRY_COUNT failed, retrying in 30s..."
112+ sleep 30
113+ fi
114+ done
115+ # Check if the last command succeeded
116+ if [ $EXIT_CODE -ne 0 ]; then
117+ echo "vsix-prepublish failed after $TRY_COUNT attempts."
118+ exit 1
119+ fi
120+ displayName: Build files
121+ workingDirectory: $(Build.SourcesDirectory)\Extension
109122
110123 - script : |
111124 cd $(Build.SourcesDirectory)\Extension
You can’t perform that action at this time.
0 commit comments