Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ services:
- "./windows.ltsc2022:c:\\app"
working_dir: "c:\\app"
entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"]

windows.ltsc2025:
build: windows.ltsc2025
image: docker.packages.octopushq.com/octopusdeploy/worker-tools:${BUILD_NUMBER?err}-windows.ltsc2025
volumes:
- "./windows.ltsc2025:c:\\app"
working_dir: "c:\\app"
entrypoint: ["pwsh", "-file", "scripts/run-tests.ps1"]
143 changes: 143 additions & 0 deletions windows.ltsc2025/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# escape=`

FROM mcr.microsoft.com/dotnet/sdk:10.0.300-windowsservercore-ltsc2025
SHELL ["powershell", "-Command"]

ARG 7Zip_Version=26.0.0
ARG Argo_Cli_Version=3.4.2
ARG Chocolatey_Version=2.7.2
ARG Dotnet_Runtime_Version=8.0.27
ARG Aws_Cli_Version=2.34.53
ARG Aws_Iam_Authenticator_Version=0.7.17
ARG Aws_Powershell_Version=5.0.218
ARG Azure_Cli_Version=2.86.0
ARG Azure_Powershell_Version=15.6.1
ARG Eks_Cli_Version=0.226.0
ARG Git_Version=2.54.0
ARG Google_Cloud_Cli_Version=566.0.0
ARG Helm_Version=3.20.1
ARG Java_Jdk_Version=25.0.0.1
ARG Kubectl_Version=1.36.1
ARG Kubectl_Versions=1.32.12,1.33.8,1.34.4,1.35.1,1.36.1
ARG Kubelogin_Version=0.2.17
ARG Node_Version=24.16.0
ARG Nuget_Cli_Version=7.6.0
ARG Octopus_Cli_Legacy_Version=9.1.7
ARG Octopus_Cli_Version=2.21.1
ARG Octopus_Client_Version=21.12.2734
ARG Pip_Version=26.1.2
ARG Powershell_Version=7.6.1
ARG Python_Version=3.14.5
ARG ScriptCs_Version=0.17.1
ARG Terraform_Version=1.15.4

# Install Choco
RUN $ProgressPreference = 'SilentlyContinue'; `
$Env:chocolateyVersion = $Env:Chocolatey_Version; `
Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# Disable .NET CLI telemetry
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1

# Install the .NET 8 runtime alongside the .NET 10 SDK from the base image
RUN Invoke-WebRequest 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1' -outFile 'dotnet-install.ps1'; `
.\dotnet-install.ps1 -Version $Env:Dotnet_Runtime_Version -Runtime dotnet -InstallDir 'C:\Program Files\dotnet'; `
rm dotnet-install.ps1

# Install JDK
RUN choco install openjdk --allow-empty-checksums --y --no-progress --version $Env:Java_Jdk_Version; `
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1; `
Update-SessionEnvironment

# Install Azure CLI
RUN choco install azure-cli -y --version $Env:Azure_Cli_Version --no-progress

# remove az cli warning - https://github.com/Azure/arm-deploy/issues/173
RUN az config set bicep.use_binary_from_path=false

# Install the AWS CLI
RUN choco install awscli -y --version $Env:Aws_Cli_Version --no-progress

# Install the AWS IAM Authenticator
RUN choco install aws-iam-authenticator -y --version $Env:Aws_Iam_Authenticator_Version --no-progress

# Install AWS PowerShell modules
# https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-windows.html#ps-installing-awspowershellnetcore
RUN Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; `
Install-Module -name AWSPowerShell.NetCore -RequiredVersion $Env:Aws_Powershell_Version -Force

# Install Azure PowerShell modules
# https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1
RUN Install-Module -Force -Name Az -AllowClobber -Scope AllUsers -MaximumVersion $Env:Azure_Powershell_Version; `
Enable-AzureRmAlias -Scope LocalMachine

# Install NodeJS
RUN choco install nodejs-lts -y --version $Env:Node_Version --no-progress

# Install kubectl
RUN New-Item -ItemType Directory -Path C:\kubectl -Force | Out-Null; `
foreach ($v in ($Env:Kubectl_Versions -split ',')) { `
Invoke-WebRequest "https://dl.k8s.io/release/v$v/bin/windows/amd64/kubectl.exe" -OutFile "C:\kubectl\kubectl-$v.exe"; `
} `
Copy-Item "C:\kubectl\kubectl-$($Env:Kubectl_Version).exe" C:\Windows\system32\kubectl.exe;

# Install Kubelogin
RUN choco install azure-kubelogin --version $Env:Kubelogin_Version --no-progress -y

# Install helm 3
RUN Invoke-WebRequest "https://get.helm.sh/helm-v${Env:Helm_Version}-windows-amd64.zip" -OutFile helm.zip; `
Expand-Archive helm.zip -DestinationPath helm; `
mv helm\windows-amd64\helm.exe C:\Windows\system32\; `
Remove-Item -Recurse -Force helm, helm.zip

# Install Terraform
RUN choco install -y terraform --version $Env:Terraform_Version --no-progress

# Install python
RUN choco install -y python3 --version $Env:Python_Version --no-progress; `
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1; `
Update-SessionEnvironment

# Install Pip
RUN python -m pip install --upgrade pip==$Env:Pip_Version

# Install 7ZIP because gcloud
RUN choco install 7zip -y --version $Env:7Zip_Version --no-progress

# Install gcloud
RUN choco install gcloudsdk -y --version $Env:Google_Cloud_Cli_Version --no-progress

# Install gcloud kubectl auth
RUN gcloud components install gke-gcloud-auth-plugin --quiet

# Install ScriptCS
RUN choco install scriptcs -y --version $Env:ScriptCs_Version --no-progress

# Install Octopus CLI
RUN choco install octopus-cli -y --version $Env:Octopus_Cli_Version --no-progress

# Install octo
RUN choco install octopustools -y --version $Env:Octopus_Cli_Legacy_Version --no-progress

# Install Octopus Client
RUN Install-Package Octopus.Client -source https://www.nuget.org/api/v2 -SkipDependencies -Force -RequiredVersion $Env:Octopus_Client_Version

# Install eksctl
RUN choco install eksctl -y --version $Env:Eks_Cli_Version --no-progress

# Install NuGet CLI
RUN choco install nuget.commandline -y --version $Env:Nuget_Cli_Version --no-progress

# PowerShell 7 is provided by the .NET SDK base image

# Install Git
RUN choco install git.install --yes --version $Env:Git_Version --no-progress

# Install Argo CD
RUN choco install argocd-cli --yes --version $Env:Argo_Cli_Version --no-progress

# Update path for new tools
ADD .\scripts\update_path.cmd C:\update_path.cmd
RUN .\update_path.cmd;
54 changes: 54 additions & 0 deletions windows.ltsc2025/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Windows WorkerTools

> Please note that we update this document periodically to match the latest version on DockerHub which is publicly available.
> This does not necessarily match the content of Dockerfiles in this repository, as they may contain changes that are not released yet.

## Image Name

`octopusdeploy/worker-tools`

## Tags

- `6.0.0-windows.ltsc2025`
- `6.0-windows.ltsc2025`
- `6-windows.ltsc2025`
- `windows.ltsc2025`

## Digest

`<populated after first publish>`

## Base Image

`mcr.microsoft.com/windows/servercore:ltsc2025-amd64`

## Installed Software

- .NET SDK 10.0.300
- .NET Runtime 8.0.27
- .NET Framework 4.8.1
- Argo CD CLI 3.4.2
- Aws CLI 2.34.53
- Aws Iam Authenticator 0.7.17
- Aws PowerShell Modules 5.0.218
- Azure CLI 2.86.0
- Azure PowerShell Modules 15.6.1
- Eksctl 0.226.0
- Google Cloud CLI 566.0.0
- Google Cloud GKE auth plugin 566.0.0-0
- Helm 3.20.1
- Java Jdk 25.0.0.1
- Kubectl 1.36.1 (also 1.35.1, 1.34.4, 1.33.8, 1.32.12 in C:\kubectl)
- Kubelogin (azure-kubelogin) 0.2.17
- Node 24.16.0
- Nuget CLI 7.6.0
- Octopus CLI Legacy 9.1.7
- Octopus CLI 2.21.1
- Octopus Client 21.12.2734
- Powershell 7.6.1
- Python 3.14.5
- Pip 26.1.2
- ScriptCs 0.17.1
- Terraform 1.15.4
- 7Zip 26.0
- Chocolatey 2.7.2
4 changes: 4 additions & 0 deletions windows.ltsc2025/Tests.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG ContainerUnderTest=octopusdeploy/worker-tools

FROM ${ContainerUnderTest}
SHELL ["powershell", "-Command"]
22 changes: 22 additions & 0 deletions windows.ltsc2025/scripts/run-tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Write-Output "##teamcity[blockOpened name='Pester tests']"

try {
Install-Module -Name "Pester" -MinimumVersion "5.0.2" -Force

Import-Module -Name "Pester"

Set-Location /app/spec

Write-Output "Running Pester Tests"
$configuration = [PesterConfiguration]::Default
$configuration.TestResult.Enabled = $true
$configuration.TestResult.OutputPath = '/app/spec/PesterTestResults.xml'
$configuration.TestResult.OutputFormat = 'NUnitXml'
$configuration.Run.PassThru = $true
$configuration.Output.Verbosity = "Detailed"

Invoke-Pester -configuration $configuration
} catch {
exit 1
}
Write-Output "##teamcity[blockClosed name='Pester tests']"
2 changes: 2 additions & 0 deletions windows.ltsc2025/scripts/update_path.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
setx /M path "%PATH%;C:\kubectl;C:\Program Files\PackageManagement\NuGet\Packages\Octopus.Client.21.11.2726\lib\net462\Octopus.Client.dll"

Loading