Skip to content

Commit

Permalink
ci: fix hang when validating AppVeyor artifacts (#39362)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1eb6e45)
  • Loading branch information
jkleinsc committed Aug 7, 2023
1 parent 66f42b3 commit dc7b42e
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 47 deletions.
54 changes: 31 additions & 23 deletions appveyor-woa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,48 +187,56 @@ for:
7z a pdb.zip out\Default\*.pdb
}
- python3 electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest

deploy_script:
- cd electron
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
Write-Output "Uploading Electron release distribution to azure"
& python3 script\release\uploaders\upload.py --verbose --upload_to_storage
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python3 script\release\uploaders\upload.py --verbose
}
}
on_finish:
# Uncomment this lines to enable RDP
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: |
cd C:\projects\src
$missing_artifacts = $false
if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
Write-warning "Skipping artifact validation for doc-only PR"
} else {
$artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
foreach($artifact_name in $artifacts_to_upload) {
$artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip'
foreach($artifact_name in $artifacts_to_validate) {
if ($artifact_name -eq 'ffmpeg.zip') {
$artifact_file = "out\ffmpeg\ffmpeg.zip"
} elseif ($artifact_name -eq 'node_headers.zip') {
$artifact_file = $artifact_name
} else {

Check failure on line 202 in appveyor-woa.yml

View check run for this annotation

trop / Backportable? - 22-x-y

appveyor-woa.yml#L184-L202

Patch Conflict
Raw output
++<<<<<<< HEAD
 +          $artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
 +          foreach($artifact_name in $artifacts_to_upload) {
 +            if ($artifact_name -eq 'ffmpeg.zip') {
 +              $artifact_file = "out\ffmpeg\ffmpeg.zip"
 +            } elseif ($artifact_name -eq 'node_headers.zip') {
 +              $artifact_file = $artifact_name
 +            } else {
 +              $artifact_file = "out\Default\$artifact_name"
 +            }
 +            if (Test-Path $artifact_file) {
 +              appveyor-retry appveyor PushArtifact $artifact_file          
 +            } else {
 +              Write-warning "$artifact_name is missing and cannot be added to artifacts"
 +              $missing_artifacts = $true
 +            }
 +          }
 +          if ($missing_artifacts) {
 +            throw "Build failed due to missing artifacts"
 +          }
++=======
+           if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
+             Write-warning "Skipping artifact validation for doc-only PR"
+           } else {
+             $artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip'
+             foreach($artifact_name in $artifacts_to_validate) {
+               if ($artifact_name -eq 'ffmpeg.zip') {
+                 $artifact_file = "out\ffmpeg\ffmpeg.zip"
+               } elseif ($artifact_name -eq 'node_headers.zip') {
+                 $artifact_file = $artifact_name
+               } else {
+                 $artifact_file = "out\Default\$artifact_name"
+               }
+               if (-not(Test-Path $artifact_file)) {
+                 Write-warning "$artifact_name is missing and cannot be added to artifacts"
+                 $missing_artifacts = $true
+               }
+             }
+           }
+           if ($missing_artifacts) {
+             throw "Build failed due to missing artifacts"
+           }
+ 
+     deploy_script:
+       - cd electron
+       - ps: >-
+           if (Test-Path Env:\ELECTRON_RELEASE) {
+             if (Test-Path Env:\UPLOAD_TO_STORAGE) {
+               Write-Output "Uploading Electron release distribution to azure"
+               & python3 script\release\uploaders\upload.py --verbose --upload_to_storage
+             } else {
+               Write-Output "Uploading Electron release distribution to github releases"
+               & python3 script\release\uploaders\upload.py --verbose
+             }
+           }
+     on_finish:
+       # Uncomment this lines to enable RDP
+       # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+       - cd C:\projects\src
+       - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
+       - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
+       - if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
+       - if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
+       - if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
+       - if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
+       - if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
+       - if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
+       - if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)        
++>>>>>>> ci: fix hang when validating AppVeyor artifacts (#39362)

Check failure on line 202 in appveyor-woa.yml

View check run for this annotation

trop / Backportable? - 23-x-y

appveyor-woa.yml#L184-L202

Patch Conflict
Raw output
++<<<<<<< HEAD
 +          $artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
 +          foreach($artifact_name in $artifacts_to_upload) {
 +            if ($artifact_name -eq 'ffmpeg.zip') {
 +              $artifact_file = "out\ffmpeg\ffmpeg.zip"
 +            } elseif ($artifact_name -eq 'node_headers.zip') {
 +              $artifact_file = $artifact_name
 +            } else {
 +              $artifact_file = "out\Default\$artifact_name"
 +            }
 +            if (Test-Path $artifact_file) {
 +              appveyor-retry appveyor PushArtifact $artifact_file          
 +            } else {
 +              Write-warning "$artifact_name is missing and cannot be added to artifacts"
 +              $missing_artifacts = $true
 +            }
 +          }
 +          if ($missing_artifacts) {
 +            throw "Build failed due to missing artifacts"
 +          }
++=======
+           if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
+             Write-warning "Skipping artifact validation for doc-only PR"
+           } else {
+             $artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip'
+             foreach($artifact_name in $artifacts_to_validate) {
+               if ($artifact_name -eq 'ffmpeg.zip') {
+                 $artifact_file = "out\ffmpeg\ffmpeg.zip"
+               } elseif ($artifact_name -eq 'node_headers.zip') {
+                 $artifact_file = $artifact_name
+               } else {
+                 $artifact_file = "out\Default\$artifact_name"
+               }
+               if (-not(Test-Path $artifact_file)) {
+                 Write-warning "$artifact_name is missing and cannot be added to artifacts"
+                 $missing_artifacts = $true
+               }
+             }
+           }
+           if ($missing_artifacts) {
+             throw "Build failed due to missing artifacts"
+           }
+ 
+     deploy_script:
+       - cd electron
+       - ps: >-
+           if (Test-Path Env:\ELECTRON_RELEASE) {
+             if (Test-Path Env:\UPLOAD_TO_STORAGE) {
+               Write-Output "Uploading Electron release distribution to azure"
+               & python3 script\release\uploaders\upload.py --verbose --upload_to_storage
+             } else {
+               Write-Output "Uploading Electron release distribution to github releases"
+               & python3 script\release\uploaders\upload.py --verbose
+             }
+           }
+     on_finish:
+       # Uncomment this lines to enable RDP
+       # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+       - cd C:\projects\src
+       - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
+       - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
+       - if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
+       - if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
+       - if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
+       - if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
+       - if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
+       - if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
+       - if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)        
++>>>>>>> ci: fix hang when validating AppVeyor artifacts (#39362)
$artifact_file = "out\Default\$artifact_name"
}
if (Test-Path $artifact_file) {
appveyor-retry appveyor PushArtifact $artifact_file
} else {
if (-not(Test-Path $artifact_file)) {
Write-warning "$artifact_name is missing and cannot be added to artifacts"
$missing_artifacts = $true
}
}
if ($missing_artifacts) {
throw "Build failed due to missing artifacts"
}
if ($missing_artifacts) {
throw "Build failed due to missing artifacts"
}
deploy_script:
- cd electron
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
Write-Output "Uploading Electron release distribution to azure"
& python3 script\release\uploaders\upload.py --verbose --upload_to_storage
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python3 script\release\uploaders\upload.py --verbose
}
}
on_finish:
# Uncomment this lines to enable RDP
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- cd C:\projects\src
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
- ps: >-
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
appveyor-retry appveyor PushArtifact pdb.zip
Expand Down
55 changes: 31 additions & 24 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,49 +185,56 @@ for:
7z a pdb.zip out\Default\*.pdb
}
- python3 electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest

deploy_script:
- cd electron
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
Write-Output "Uploading Electron release distribution to azure"
& python3 script\release\uploaders\upload.py --verbose --upload_to_storage
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python3 script\release\uploaders\upload.py --verbose
}
}
on_finish:
# Uncomment this lines to enable RDP
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: |
cd C:\projects\src
$missing_artifacts = $false
if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
Write-warning "Skipping artifact validation for doc-only PR"
} else {
$artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
foreach($artifact_name in $artifacts_to_upload) {
$artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip'
foreach($artifact_name in $artifacts_to_validate) {
if ($artifact_name -eq 'ffmpeg.zip') {
$artifact_file = "out\ffmpeg\ffmpeg.zip"
} elseif ($artifact_name -eq 'node_headers.zip') {
$artifact_file = $artifact_name
} else {

Check failure on line 200 in appveyor.yml

View check run for this annotation

trop / Backportable? - 22-x-y

appveyor.yml#L182-L200

Patch Conflict
Raw output
++<<<<<<< HEAD
 +          $artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
 +          foreach($artifact_name in $artifacts_to_upload) {
 +            if ($artifact_name -eq 'ffmpeg.zip') {
 +              $artifact_file = "out\ffmpeg\ffmpeg.zip"
 +            } elseif ($artifact_name -eq 'node_headers.zip') {
 +              $artifact_file = $artifact_name
 +            } else {
 +              $artifact_file = "out\Default\$artifact_name"
 +            }
 +            if (Test-Path $artifact_file) {
 +              appveyor-retry appveyor PushArtifact $artifact_file          
 +            } else {
 +              Write-warning "$artifact_name is missing and cannot be added to artifacts"
 +              $missing_artifacts = $true
 +            }
 +          }
 +          if ($missing_artifacts) {
 +            throw "Build failed due to missing artifacts"
 +          }
++=======
+           if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
+             Write-warning "Skipping artifact validation for doc-only PR"
+           } else {
+             $artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip'
+             foreach($artifact_name in $artifacts_to_validate) {
+               if ($artifact_name -eq 'ffmpeg.zip') {
+                 $artifact_file = "out\ffmpeg\ffmpeg.zip"
+               } elseif ($artifact_name -eq 'node_headers.zip') {
+                 $artifact_file = $artifact_name
+               } else {
+                 $artifact_file = "out\Default\$artifact_name"
+               }
+               if (-not(Test-Path $artifact_file)) {
+                 Write-warning "$artifact_name is missing and cannot be added to artifacts"
+                 $missing_artifacts = $true
+               }
+             }
+           }
+           if ($missing_artifacts) {
+             throw "Build failed due to missing artifacts"
+           }
+ 
+     deploy_script:
+       - cd electron
+       - ps: >-
+           if (Test-Path Env:\ELECTRON_RELEASE) {
+             if (Test-Path Env:\UPLOAD_TO_STORAGE) {
+               Write-Output "Uploading Electron release distribution to azure"
+               & python3 script\release\uploaders\upload.py --verbose --upload_to_storage
+             } else {
+               Write-Output "Uploading Electron release distribution to github releases"
+               & python3 script\release\uploaders\upload.py --verbose
+             }
+           }
+     on_finish:
+       # Uncomment this lines to enable RDP
+       # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+       - cd C:\projects\src
+       - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
+       - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
+       - if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
+       - if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
+       - if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
+       - if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
+       - if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
+       - if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
+       - if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)        
++>>>>>>> ci: fix hang when validating AppVeyor artifacts (#39362)

Check failure on line 200 in appveyor.yml

View check run for this annotation

trop / Backportable? - 23-x-y

appveyor.yml#L182-L200

Patch Conflict
Raw output
++<<<<<<< HEAD
 +          $artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
 +          foreach($artifact_name in $artifacts_to_upload) {
 +            if ($artifact_name -eq 'ffmpeg.zip') {
 +              $artifact_file = "out\ffmpeg\ffmpeg.zip"
 +            } elseif ($artifact_name -eq 'node_headers.zip') {
 +              $artifact_file = $artifact_name
 +            } else {
 +              $artifact_file = "out\Default\$artifact_name"
 +            }
 +            if (Test-Path $artifact_file) {
 +              appveyor-retry appveyor PushArtifact $artifact_file          
 +            } else {
 +              Write-warning "$artifact_name is missing and cannot be added to artifacts"
 +              $missing_artifacts = $true
 +            }
 +          }
 +          if ($missing_artifacts) {
 +            throw "Build failed due to missing artifacts"
 +          }
++=======
+           if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
+             Write-warning "Skipping artifact validation for doc-only PR"
+           } else {
+             $artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip'
+             foreach($artifact_name in $artifacts_to_validate) {
+               if ($artifact_name -eq 'ffmpeg.zip') {
+                 $artifact_file = "out\ffmpeg\ffmpeg.zip"
+               } elseif ($artifact_name -eq 'node_headers.zip') {
+                 $artifact_file = $artifact_name
+               } else {
+                 $artifact_file = "out\Default\$artifact_name"
+               }
+               if (-not(Test-Path $artifact_file)) {
+                 Write-warning "$artifact_name is missing and cannot be added to artifacts"
+                 $missing_artifacts = $true
+               }
+             }
+           }
+           if ($missing_artifacts) {
+             throw "Build failed due to missing artifacts"
+           }
+ 
+     deploy_script:
+       - cd electron
+       - ps: >-
+           if (Test-Path Env:\ELECTRON_RELEASE) {
+             if (Test-Path Env:\UPLOAD_TO_STORAGE) {
+               Write-Output "Uploading Electron release distribution to azure"
+               & python3 script\release\uploaders\upload.py --verbose --upload_to_storage
+             } else {
+               Write-Output "Uploading Electron release distribution to github releases"
+               & python3 script\release\uploaders\upload.py --verbose
+             }
+           }
+     on_finish:
+       # Uncomment this lines to enable RDP
+       # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+       - cd C:\projects\src
+       - if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
+       - if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
+       - if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
+       - if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
+       - if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
+       - if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
+       - if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
+       - if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
+       - if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)        
++>>>>>>> ci: fix hang when validating AppVeyor artifacts (#39362)
$artifact_file = "out\Default\$artifact_name"
}
if (Test-Path $artifact_file) {
appveyor-retry appveyor PushArtifact $artifact_file
} else {
if (-not(Test-Path $artifact_file)) {
Write-warning "$artifact_name is missing and cannot be added to artifacts"
$missing_artifacts = $true
}
}
if ($missing_artifacts) {
throw "Build failed due to missing artifacts"
}
if ($missing_artifacts) {
throw "Build failed due to missing artifacts"
}
deploy_script:
- cd electron
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
Write-Output "Uploading Electron release distribution to azure"
& python3 script\release\uploaders\upload.py --verbose --upload_to_storage
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python3 script\release\uploaders\upload.py --verbose
}
}
on_finish:
# Uncomment this lines to enable RDP
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- cd C:\projects\src
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
- ps: >-
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
appveyor-retry appveyor PushArtifact pdb.zip
Expand Down

0 comments on commit dc7b42e

Please sign in to comment.