我們正在開發UWP應用程序,我們每天都在運行Jenkins自動作業。幾天前我們配置了一臺新的雲計算機從機器,我試圖運行同一個Jenkins作業,但不幸的是,我在運行powershell腳本時遇到了Jenkins方面的軟件包安裝錯誤,以便安裝該應用程序以運行自動化測試它。Windows無法安裝軟件包,因爲此軟件包取決於另一個無法找到的軟件包
下面是詳細信息錯誤日誌(確切的包名稱是爲隱私問題刪除):
Building remotely on gui_slave (codedui) in workspace c:\jenkins\workspace
No emails were triggered.
Jenkins Artifactory Plugin version: 2.7.2
Beginning to resolve Build Info dependencies.
Finished resolving Build Info dependencies.
Beginning to resolve Build Info build dependencies.
Dependency on build [AppName_winGL_build], number [LATEST], pattern [buildfile.zip] - [1] result found.
File 'c:\jenkins\workspace\buildfile.zip' already exists locally, skipping remote download.
Finished resolving Build Info build dependencies.
[workspace] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\hudson5953527437702531475.bat
c:\jenkins\workspace>echo Removing previous package
Removing previous package
c:\jenkins\workspace>rm -rf AppName_*
c:\jenkins\workspace>exit 0
[workspace] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\ADMINI~1\AppData\Local\Temp\hudson1092677328160315251.ps1'"
[workspace] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\hudson8287274088387671359.bat
Removing existing test files
Running test setup script
Found powershell script: C:\jenkins\workspace\AppName_4.1.0.353_Test\Add-AppDevPackage.ps1
Found bundle: C:\jenkins\workspace\AppName_4.1.0.353_Test\AppName_4.1.0.353_x86_x64_arm.appxbundle
Installing app...
Found dependency package(s):
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.NET.Native.Framework.1.3.appx
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.NET.Native.Runtime.1.4.appx
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.VCLibs.x86.14.00.appx
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict
validation.
Windows cannot install package 89006A2E.AppName because this package depends on another package that couldn't be
found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by
CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install; the frameworks with name
Microsoft.NET.Native.Runtime.1.4 available to the user are
Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe. Provide the correct framework along wi
Windows cannot install package 89006A2E.AppName because this package depends on another package that couldn't be
found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by
CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install; the frameworks with name
Microsoft.NET.Native.Runtime.1.4 available to the user are
Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe. Provide the correct framework along with this package.
NOTE: For additional information, look for [ActivityId] 67e7a303-493c-0003-aca6-e7673c49d201 in the Event Log or use
the command line Get-AppxLog -ActivityID 67e7a303-493c-0003-aca6-e7673c49d201
At C:\jenkins\workspace\AppName_4.1.0.353_Test\Add-AppDevPackage.ps1:388 char:13
+ Add-AppxPackage -Path $DeveloperPackagePath.FullName -Dep ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\jenkins\work..._arm.appxbundle:String) [Add-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
Error: Could not install the app.
Build step 'Execute Windows batch command' marked build as failure
[MSTEST-PLUGIN] Processing test results in file(s) TestResults\*.trx
FATAL: [MSTEST-PLUGIN] No MSTest TRX test report files were found. Configuration error?
Build step 'Publish MSTest test result report' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
同樣的PowerShell腳本運行完全正常,當我們手工但不運行它時詹金斯運行。
我試圖解決這個問題在MSDN論壇上,但得到指出,問題在於詹金斯而不是Windows包。我沒有深入到詹金斯工作從而尋找出幫助在這裏
有什麼我試圖來解決這個問題:
1 - 手動添加依賴這樣的 -
<PackageDependency Name="Microsoft.NET.Native.Runtime.1.4" MinVersion="1.4.24201.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
2 - 重新安裝新的運行時。
3 - 將軟件包Dependency文件夾中的Runtime軟件包複製到我的機器上。
沒有工作到現在。一定的幫助肯定會被讚賞。
問候,
短跑
您是否正在Jenkins slave運行的同一個OS用戶下手動運行腳本?也許這是一個權限問題? – Ivan
由於在安裝新軟件包之前用於卸載的應用程序沒有權限問題。無論如何,我們找到了我發佈的解決方案作爲答案。 – Dash