From e95939f508d65de68ade4d0770187bdb3a6cf71e Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Mon, 13 May 2024 17:29:45 +0900 Subject: [PATCH] Updated Cygwin --- Dockerfiles/build-mysql/windows/Dockerfile.agent | 6 ++++-- Dockerfiles/build-mysql/windows/Dockerfile.agent2 | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index 0844c5e94..dae5487ca 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -26,12 +26,14 @@ LABEL org.opencontainers.image.title="Zabbix agent build (Windows)" ` SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] RUN Set-Location -Path $env:SystemDrive\.; ` + ` + $GIT_BRANCH = $env:GIT_BRANCH ?? $env:ZBX_VERSION ` ` Import-Module ('{0}\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll' -f ${env:ProgramFiles(x86)} ); ` Enter-VsDevShell -VsInstallPath ('{0}\Microsoft Visual Studio\2019\BuildTools' -f ${env:ProgramFiles(x86)}) -DevCmdArguments """-arch=$env:BUILD_ARCH"""; ` ` - Write-Host ('Checkout GIT {0} (master) repository ...' -f $env:ZBX_SOURCES); ` - git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH ?? $env:ZBX_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` + Write-Host ('Checkout GIT {0} ({1}) repository ...' -f $env:ZBX_SOURCES, $GIT_BRANCH); ` + git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $GIT_BRANCH --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` ` Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); ` Set-Location -Path $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index 6b0fffc90..276b7c2e8 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -29,12 +29,16 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" ` org.opencontainers.image.source="${ZBX_SOURCES}" RUN Set-Location -Path $env:SystemDrive\.; ` + ` + $GIT_BRANCH = $env:GIT_BRANCH ?? $env:ZBX_VERSION ` + $MONGODB_PLUGIN_VERSION = $env:MONGODB_PLUGIN_VERSION ?? $env:ZBX_VERSION ` + $POSTGRESQL_PLUGIN_VERSION = $env:POSTGRESQL_PLUGIN_VERSION ?? $env:ZBX_VERSION ` ` Import-Module ('{0}\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll' -f ${env:ProgramFiles(x86)} ); ` Enter-VsDevShell -VsInstallPath ('{0}\Microsoft Visual Studio\2019\BuildTools' -f ${env:ProgramFiles(x86)}) -DevCmdArguments """-arch=$env:BUILD_ARCH"""; ` ` - Write-Host ('Checkout GIT {0} ({1}) repository ...' -f $env:ZBX_SOURCES, $env:GIT_BRANCH ?? $env:ZBX_VERSION); ` - git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH ?? $env:ZBX_VERSION --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` + Write-Host ('Checkout GIT {0} ({1}) repository ...' -f $env:ZBX_SOURCES, $GIT_BRANCH); ` + git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $GIT_BRANCH --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` ` Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); ` Set-Location -Path $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` @@ -60,7 +64,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` ` Set-Location -Path $env:SystemDrive; ` Write-Host ('Building Zabbix MongoDB plugin {0} version ...' -f $env:MONGODB_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $env:MONGODB_PLUGIN_VERSION ?? $env:ZBX_VERSION --depth 1 --single-branch $env:SystemDrive\mongodb_plugin; ` + git -c advice.detachedHead=false clone $env:MONGODB_PLUGIN_SOURCES --branch $MONGODB_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\mongodb_plugin; ` Set-Location -Path $env:SystemDrive\mongodb_plugin; ` mingw32-make; ` mv $env:SystemDrive\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe $env:SystemDrive\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe; ` @@ -69,7 +73,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` ` Set-Location -Path $env:SystemDrive; ` Write-Host ('Building Zabbix PostgreSQL plugin {0} version ...' -f $env:POSTGRESQL_PLUGIN_VERSION); ` - git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $env:POSTGRESQL_PLUGIN_VERSION ?? $env:ZBX_VERSION --depth 1 --single-branch $env:SystemDrive\postgresql_plugin; ` + git -c advice.detachedHead=false clone $env:POSTGRESQL_PLUGIN_SOURCES --branch $POSTGRESQL_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\postgresql_plugin; ` Set-Location -Path $env:SystemDrive\postgresql_plugin; ` mingw32-make; ` mv $env:SystemDrive\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe $env:SystemDrive\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe; `