generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #687 from ministryofjustice/DSO/DSOS-2568/fix-wind…
…ows-2012-components Dso/dsos 2568/fix windows 2012 components
- Loading branch information
Showing
9 changed files
with
81 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: chocolatey | ||
description: Component to install chocolatey | ||
schemaVersion: 1.0 | ||
parameters: | ||
- Version: | ||
type: string | ||
default: 0.0.4 | ||
description: Component version (update this each time the file changes) | ||
- Platform: | ||
type: string | ||
default: "Windows" | ||
description: Platform. | ||
phases: | ||
- name: build | ||
steps: | ||
- name: InstallChocolatey | ||
action: ExecutePowerShell | ||
inputs: | ||
commands: | ||
- | | ||
if (Get-Command choco.exe -ErrorAction SilentlyContinue) { | ||
Write-Host "Chocolatey already installed" | ||
[System.Environment]::Exit(0) | ||
} else { | ||
Write-Host "Installing Chocolatey" | ||
Set-ExecutionPolicy Bypass -Scope Process -Force | ||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | ||
[System.Environment]::Exit(3010) | ||
} |
28 changes: 28 additions & 0 deletions
28
commonimages/components/templates/powershell_core_server_2012.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: powershell_core_server_2012 | ||
description: Component to install PowerShell Core on Windows Server 2012, has different command line flags as there are not supported packages for this version since Windows Server 2012 r2 is nearing EOL | ||
schemaVersion: 1.0 | ||
parameters: | ||
- Version: | ||
type: string | ||
default: 0.0.3 | ||
description: Component version (update this each time the file changes) | ||
- Platform: | ||
type: string | ||
default: "Windows" | ||
description: Platform. | ||
- PowerShellCoreVersion: | ||
type: string | ||
default: 7.4.1 | ||
description: Version of the PowerShell Core to install | ||
phases: | ||
- name: build | ||
steps: | ||
- name: InstallPowerShellCore | ||
action: ExecutePowerShell | ||
inputs: | ||
commands: | ||
- | | ||
choco install -y chocolatey-core.extension | ||
choco install -y kb3118401 | ||
choco install -y powershell-core --version '{{ PowerShellCoreVersion }}' --install-arguments='"ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 USE_MU=0 ENABLE_MU=0 ADD_PATH=1 DISABLE_TELEMETRY"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ locals { | |
}, | ||
{ | ||
name = "aws_cli" | ||
version = "0.0.2" | ||
version = "0.0.4" | ||
parameters = [] | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters