Skip to content

Commit 7e6658e

Browse files
committed
Reapply "Install and use Microsoft provide OpenSSH"
This reverts commit 65151ca.
1 parent 08065f0 commit 7e6658e

File tree

6 files changed

+903
-1118
lines changed

6 files changed

+903
-1118
lines changed

lib/packer/config/templates/provision_windows2019.json.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"inline": [
148148
"$ErrorActionPreference = \"Stop\";",
149149
"trap { $host.SetShouldExit(1) }",
150-
"Install-SSHD -SSHZipFile 'C:\\provision\\OpenSSH-Win64.zip'"
150+
"Install-SSHD"
151151
]
152152
},
153153
{

modules/BOSH.SSH/BOSH.SSH.psd1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
Copyright = '(c) 2017 BOSH'
77
Description = 'Install Microsoft SSHD'
88
PowerShellVersion = '4.0'
9-
FunctionsToExport = @('Install-SSHD',
10-
'Enable-SSHD',
11-
'Remove-SSHKeys')
9+
RequiredModules = @('BOSH.Utils')
10+
FunctionsToExport = @('Install-SSHD', 'Enable-SSHD', 'Remove-SSHKeys')
1211
CmdletsToExport = @()
1312
VariablesToExport = '*'
1413
AliasesToExport = @()

modules/BOSH.Utils/BOSH.Utils.Tests.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
BeforeAll {
22
Import-Module ./BOSH.Utils.psm1
33

4+
$osVersion = "windows2019"
5+
46
# As of now, this function only supports DWords and Strings.
57
function Restore-RegistryState
68
{
@@ -328,7 +330,7 @@ Describe "BOSH.Utils" {
328330
$actualOSVersion = $null
329331

330332
{ Get-OSVersion | Set-Variable -Name "actualOSVersion" -Scope 1 } | Should -Not -Throw
331-
$actualOsVersion | Should -eq "windows2019"
333+
$actualOsVersion | Should -eq $osVersion
332334

333335
Assert-MockCalled Write-Log -Times 1 -Scope It -ParameterFilter { $Message -eq "Found OS version: Windows 2019" } -ModuleName BOSH.Utils
334336
Assert-MockCalled Get-OSVersionString -Times 1 -Scope It -ModuleName BOSH.Utils

stembuild/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ You will need to construct `assets/StemcellAutomation.zip`. This file represents
240240
**assets/StemcellAutomation.zip files:**
241241
| File | Source / Description |
242242
|-|-|
243-
| OpenSSH-Win64.zip | https://github.com/PowerShell/Win32-OpenSSH/releases |
244243
| bosh-psmodules.zip | https://github.com/cloudfoundry/bosh-psmodules/tree/master/modules |
245244
| agent.zip | A zip constructed using various BOSH executables. See list of necessary files below. |
246245
| deps.json | A JSON file with the SHA256 checksums and optionally the version for each component in this zip. See format below. |
@@ -262,9 +261,6 @@ You will need to construct `assets/StemcellAutomation.zip`. This file represents
262261
**deps.json format:**
263262
```json
264263
{
265-
"OpenSSH-Win64.zip": {
266-
"sha": "SOME-SHA256"
267-
},
268264
"bosh-psmodules.zip": {
269265
"sha": "SOME-SHA256"
270266
},
@@ -280,7 +276,6 @@ You will need to construct `assets/StemcellAutomation.zip`. This file represents
280276

281277
Once you have these files, run:
282278
```bash
283-
OPENSSH_ZIP="OpenSSH-Win64.zip" \
284279
BOSH_PSMODULES_ZIP="bosh-psmodules.zip" \
285280
AGENT_ZIP="agent.zip" \
286281
DEPS_JSON="deps.json" \

0 commit comments

Comments
 (0)