diff --git a/.github/workflows/buld-win-2025.yaml b/.github/workflows/buld-win-2025.yaml new file mode 100644 index 0000000..2e36087 --- /dev/null +++ b/.github/workflows/buld-win-2025.yaml @@ -0,0 +1,16 @@ +name: Build Windows 2025 Docker Image + +on: + push: + branches: [ "prepare-windows-2025-image" ] + +jobs: + + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v5 + - name: Build the Docker image + run: docker build windows.ltsc2025 --file windows.ltsc2025/Dockerfile --tag worker-tools-windows-ltsc2025:${{ github.run_number }} diff --git a/docker-compose.build.yml b/docker-compose.build.yml index e71b772..b3d9e6d 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -52,3 +52,10 @@ 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"] diff --git a/windows.ltsc2025/Dockerfile b/windows.ltsc2025/Dockerfile new file mode 100644 index 0000000..a251c59 --- /dev/null +++ b/windows.ltsc2025/Dockerfile @@ -0,0 +1,11 @@ +# escape=` + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 +SHELL ["powershell", "-Command"] + + +# Install Choco +RUN $ProgressPreference = 'SilentlyContinue'; ` + 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')) diff --git a/windows.ltsc2025/scripts/run-tests.ps1 b/windows.ltsc2025/scripts/run-tests.ps1 new file mode 100644 index 0000000..554b0ba --- /dev/null +++ b/windows.ltsc2025/scripts/run-tests.ps1 @@ -0,0 +1,13 @@ +Write-Output "##teamcity[blockOpened name='Pester tests']" + +try { + Install-Module -Name "Pester" -MinimumVersion "5.5.0" -Force + + Import-Module -Name "Pester" + + Write-Ouput "Nothing to see here, it's all fake, just to test the build process" + +} catch { + exit 1 +} +Write-Output "##teamcity[blockClosed name='Pester tests']"