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:
		| @@ -195,22 +195,34 @@ build { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   provisioner "powershell" { |   provisioner "powershell" { | ||||||
|     inline = [ |     scripts = [ | ||||||
|       "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12", |       "scripts/Install-WinGet.ps1" | ||||||
|       "Invoke-Expression ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" |  | ||||||
|     ] |     ] | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   provisioner "powershell" { |   provisioner "powershell" { | ||||||
|     inline = [ |     inline = [ | ||||||
|       "choco config set --name=limit-output --value=LimitOutput", |       "winget install mozilla.firefox", | ||||||
|       "choco install -y dotnetfx", |       "winget install 7zip.7zip", | ||||||
|       "choco install -y 7zip.install", |       "winget install microsoft.dotnetframework" | ||||||
|       "choco install -y sysinternals", |  | ||||||
|       "choco install -y firefox" |  | ||||||
|     ] |     ] | ||||||
|     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" { |   provisioner "windows-update" { | ||||||
|   } |   } | ||||||
| @@ -287,9 +299,9 @@ build { | |||||||
|     inline = [ |     inline = [ | ||||||
|       "qemu-img convert -f vmdk -O raw \\", |       "qemu-img convert -f vmdk -O raw \\", | ||||||
|       "  /scratch/srv2019-baremetal/${var.vm_guestos}-${var.vm_name}-baremetal-disk-0.vmdk \\", |       "  /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 \\", |       "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" |       "  > /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 | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user