рабочий вариант, но скороть 10 МБит
build / backend (push) Has been cancelled
build / node-agent (push) Has been cancelled
build / worker (push) Has been cancelled

This commit is contained in:
2026-05-22 21:46:49 +03:00
parent 469fa0e860
commit 20d361a886
280 changed files with 954890 additions and 18524 deletions
+20 -4
View File
@@ -1,4 +1,4 @@
#requires -Version 5
#requires -Version 5
param(
[string]$RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path,
@@ -8,7 +8,8 @@ param(
[switch]$PrintOnly,
[bool]$PublishToTestDockerDownloads = $false,
[string]$TestDockerSshAlias = "test-docker",
[string]$TestDockerDownloadPath = "/tmp/rap-web-admin/html/downloads"
[string]$TestDockerDownloadPath = "/tmp/rap-web-admin/html/downloads",
[string]$TestDockerBackendReleasePath = "/tmp/rap-release-0.2.309-latencyaware"
)
$ErrorActionPreference = "Stop"
@@ -53,7 +54,8 @@ function Get-JavaVersion {
Fail "Java не найден в PATH. Нужен JDK 17+."
}
$versionLine = & $javaCandidate.Source -version 2>&1 | Select-Object -First 1
$escapedJava = $javaCandidate.Source.Replace('"', '\"')
$versionLine = & cmd.exe /c "`"$escapedJava`" -version 2>&1" | Select-Object -First 1
if ($versionLine -match "version\s+`"(\d+)\.") {
return $matches[1]
}
@@ -134,7 +136,9 @@ function Publish-Artifact {
}
}
$published | ConvertTo-Json -Depth 6 | Out-File -FilePath $metaPath -Encoding utf8 -Force
$manifestJson = ($published | ConvertTo-Json -Depth 6) + [Environment]::NewLine
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllText($metaPath, $manifestJson, $utf8NoBom)
return @{
latest = $latestPath
@@ -306,6 +310,7 @@ try {
if ($PrintOnly) {
Write-Host "PrintOnly: сборка не выполнена."
$global:LASTEXITCODE = 0
return
}
@@ -384,6 +389,15 @@ try {
-LatestFile $remotePublishSource.latest `
-VersionFile $remotePublishSource.versioned `
-ManifestFile $remotePublishSource.summary
if (-not [string]::IsNullOrWhiteSpace($TestDockerBackendReleasePath) -and $TestDockerBackendReleasePath -ne $TestDockerDownloadPath) {
Write-Host "Публикую артефакты в backend RAP_RELEASE_DIR ($TestDockerSshAlias): $TestDockerBackendReleasePath"
Publish-ToTestDockerDownloads -RemoteHost $TestDockerSshAlias -RemoteRoot (Resolve-RemoteDirectory $TestDockerBackendReleasePath) `
-VersionName $versionName `
-LatestFile $remotePublishSource.latest `
-VersionFile $remotePublishSource.versioned `
-ManifestFile $remotePublishSource.summary
}
}
Write-Host "Сборка завершена."
@@ -401,3 +415,5 @@ finally {
if (-not $buildSucceeded) {
Fail "Сборка не завершена."
}
$global:LASTEXITCODE = 0
+3 -1
View File
@@ -1,4 +1,4 @@
#requires -Version 5
#requires -Version 5
param(
[string]$BuildType = "release",
@@ -9,6 +9,7 @@ param(
[string]$PortalVerifyBaseUrl = "http://192.168.200.61:18080",
[string]$TestDockerSshAlias = "test-docker",
[string]$TestDockerDownloadPath = "/tmp/rap-web-admin/html/downloads",
[string]$TestDockerBackendReleasePath = "/tmp/rap-release-0.2.309-latencyaware",
[int]$PreparationRetryDelaySeconds = 0
)
@@ -29,6 +30,7 @@ $publishToTestDockerDownloads = $PublishToTestDockerDownloads -and -not $NoRemot
-PublishToTestDockerDownloads:$publishToTestDockerDownloads `
-TestDockerSshAlias $TestDockerSshAlias `
-TestDockerDownloadPath $TestDockerDownloadPath `
-TestDockerBackendReleasePath $TestDockerBackendReleasePath `
-PortalVerifyBaseUrl $PortalVerifyBaseUrl `
-SkipPortalVerify:$SkipPortalVerify `
-PreparationRetryDelaySeconds $PreparationRetryDelaySeconds `
@@ -1,4 +1,4 @@
#requires -Version 5
#requires -Version 5
param(
[string]$RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath,
@@ -11,6 +11,7 @@ param(
[bool]$PublishToTestDockerDownloads = $true,
[string]$TestDockerSshAlias = "test-docker",
[string]$TestDockerDownloadPath = "/tmp/rap-web-admin/html/downloads",
[string]$TestDockerBackendReleasePath = "/tmp/rap-release-0.2.309-latencyaware",
[int]$PreparationRetryDelaySeconds = 0
)
@@ -69,7 +70,8 @@ if ($PrintOnly) {
-SkipWorkspaceCleanup:$SkipWorkspaceCleanup `
-PublishToTestDockerDownloads:$PublishToTestDockerDownloads `
-TestDockerSshAlias $TestDockerSshAlias `
-TestDockerDownloadPath $TestDockerDownloadPath
-TestDockerDownloadPath $TestDockerDownloadPath `
-TestDockerBackendReleasePath $TestDockerBackendReleasePath
}
exit 0
}
@@ -78,7 +80,8 @@ Run-Step "Сборка и публикация Android APK" {
& $buildScript -RepoRoot $RepoRoot -BuildType $BuildType -AndroidHome $AndroidHome -SkipWorkspaceCleanup:$SkipWorkspaceCleanup `
-PublishToTestDockerDownloads:$PublishToTestDockerDownloads `
-TestDockerSshAlias $TestDockerSshAlias `
-TestDockerDownloadPath $TestDockerDownloadPath
-TestDockerDownloadPath $TestDockerDownloadPath `
-TestDockerBackendReleasePath $TestDockerBackendReleasePath
}
Write-Host ""
+7 -4
View File
@@ -1,4 +1,4 @@
#requires -Version 5
#requires -Version 5
param(
[string]$RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).ProviderPath,
@@ -12,6 +12,7 @@ param(
[switch]$NoRemotePublish,
[string]$TestDockerSshAlias = "test-docker",
[string]$TestDockerDownloadPath = "/tmp/rap-web-admin/html/downloads",
[string]$TestDockerBackendReleasePath = "/tmp/rap-release-0.2.309-latencyaware",
[int]$PreparationRetryDelaySeconds = 0,
[string]$PortalVerifyBaseUrl = "http://192.168.200.61:18080",
[switch]$SkipPortalVerify
@@ -77,7 +78,8 @@ if ($PrintOnly) {
-SkipWorkspaceCleanup:$SkipWorkspaceCleanup `
-PublishToTestDockerDownloads:$true `
-TestDockerSshAlias $TestDockerSshAlias `
-TestDockerDownloadPath $TestDockerDownloadPath
-TestDockerDownloadPath $TestDockerDownloadPath `
-TestDockerBackendReleasePath $TestDockerBackendReleasePath
} else {
& $buildScript -RepoRoot $RepoRoot -BuildType $BuildType -AndroidHome $AndroidHome -PrintOnly `
-SkipWorkspaceCleanup:$SkipWorkspaceCleanup
@@ -90,7 +92,8 @@ Run-Step "Сборка и публикация Android APK" {
& $buildScript -RepoRoot $RepoRoot -BuildType $BuildType -AndroidHome $AndroidHome -SkipWorkspaceCleanup:$SkipWorkspaceCleanup `
-PublishToTestDockerDownloads:$true `
-TestDockerSshAlias $TestDockerSshAlias `
-TestDockerDownloadPath $TestDockerDownloadPath
-TestDockerDownloadPath $TestDockerDownloadPath `
-TestDockerBackendReleasePath $TestDockerBackendReleasePath
} else {
& $buildScript -RepoRoot $RepoRoot -BuildType $BuildType -AndroidHome $AndroidHome -SkipWorkspaceCleanup:$SkipWorkspaceCleanup
}
@@ -117,7 +120,7 @@ Run-Step "Проверка манифеста веб-панели" {
Write-Host "Sha256: $($manifest.published.sha256)"
if (-not [string]::IsNullOrWhiteSpace($PortalVerifyBaseUrl)) {
$manifestUrl = "$PortalVerifyBaseUrl/downloads/rap-android-vpn-build.json?_cb=$(Get-Date -Format 'yyyyMMddHHmmss')"
$manifestUrl = "$PortalVerifyBaseUrl/api/v1/downloads/rap-android-vpn-build.json?_cb=$(Get-Date -Format 'yyyyMMddHHmmss')"
try {
$remoteManifest = Invoke-RestMethod -Uri $manifestUrl -Method Get
if (-not $remoteManifest.version -or -not $remoteManifest.version.name -or $remoteManifest.version.name -ne $manifest.version.name) {