Fix path #2;Change package manager
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
83baeefea0
commit
5b0a8fc7df
@ -195,22 +195,34 @@ build {
|
||||
}
|
||||
|
||||
provisioner "powershell" {
|
||||
inline = [
|
||||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12",
|
||||
"Invoke-Expression ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
|
||||
scripts = [
|
||||
"scripts/Install-WinGet.ps1"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "powershell" {
|
||||
inline = [
|
||||
"choco config set --name=limit-output --value=LimitOutput",
|
||||
"choco install -y dotnetfx",
|
||||
"choco install -y 7zip.install",
|
||||
"choco install -y sysinternals",
|
||||
"choco install -y firefox"
|
||||
"winget install mozilla.firefox",
|
||||
"winget install 7zip.7zip",
|
||||
"winget install microsoft.dotnetframework"
|
||||
]
|
||||
valid_exit_codes = [0, 3010]
|
||||
// valid_exit_codes = [0, 3010]
|
||||
}
|
||||
// provisioner "powershell" {
|
||||
// inline = [
|
||||
// "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12",
|
||||
// "Invoke-Expression ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
|
||||
// ]
|
||||
// }
|
||||
// provisioner "powershell" {
|
||||
// inline = [
|
||||
// "choco config set --name=limit-output --value=LimitOutput",
|
||||
// "choco install -y dotnetfx",
|
||||
// "choco install -y 7zip.install",
|
||||
// "choco install -y sysinternals",
|
||||
// "choco install -y firefox"
|
||||
// ]
|
||||
// valid_exit_codes = [0, 3010]
|
||||
// }
|
||||
|
||||
provisioner "windows-update" {
|
||||
}
|
||||
@ -287,9 +299,9 @@ build {
|
||||
inline = [
|
||||
"qemu-img convert -f vmdk -O raw \\",
|
||||
" /scratch/srv2019-baremetal/${var.vm_guestos}-${var.vm_name}-baremetal-disk-0.vmdk \\",
|
||||
" /tmp/srv2019-baremetal/${var.vm_guestos}-${var.vm_name}.raw",
|
||||
" /tmp/${var.vm_guestos}-${var.vm_name}.raw",
|
||||
"gzip -c \\",
|
||||
" /tmp/srv2019-baremetal/${var.vm_guestos}-${var.vm_name}.raw \\",
|
||||
" /tmp/${var.vm_guestos}-${var.vm_name}.raw \\",
|
||||
" > /output/Windows-Server-2019-LTSC.raw.gz"
|
||||
]
|
||||
}
|
||||
|
18
scripts/Install-WinGet.ps1
Normal file
18
scripts/Install-WinGet.ps1
Normal file
@ -0,0 +1,18 @@
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
# None
|
||||
)
|
||||
|
||||
$InvokeRestMethodSplat = @{
|
||||
Uri = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
|
||||
Method = 'GET'
|
||||
}
|
||||
$InvokeWebRequestSplat = @{
|
||||
Uri = ((Invoke-RestMethod @InvokeRestMethodSplat).assets | Where-Object ${_.name -like '*.appxbundle'}).browser_download_url
|
||||
Out = "$env:temp\winget.appxbundle"
|
||||
}
|
||||
Invoke-WebRequest @InvokeWebRequestSplat
|
||||
|
||||
If (Test-Path -Path "$env:temp\winget.appxbundle") {
|
||||
& dism.exe /Online /Add-ProvisionedAppxPackage /PackagePath:"$env:temp\winget.appxbundle" /SkipLicense
|
||||
}
|
Loading…
Reference in New Issue
Block a user