From 5e0fb5d0bb9c09372da263d755c90dcbdc7d5931 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Thu, 15 Dec 2022 13:54:48 +0900 Subject: [PATCH] Removed Go build cache --- Dockerfiles/agent2/windows/Dockerfile | 2 +- .../build-mysql/windows/Dockerfile.agent2 | 41 ++++++++++--------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Dockerfiles/agent2/windows/Dockerfile b/Dockerfiles/agent2/windows/Dockerfile index d15950196..c57203237 100644 --- a/Dockerfiles/agent2/windows/Dockerfile +++ b/Dockerfiles/agent2/windows/Dockerfile @@ -50,7 +50,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` New-Item -Force -ItemType directory -Path $env:ZBX_HOME\modules | Out-Null; ` New-Item -Force -ItemType directory -Path $env:ZBX_HOME\buffer | Out-Null; ` ` - net accounts /MaxPWAge:unlimited; ` + net accounts /MaxPWAge:unlimited; ` net user /add zabbix /expire:never /passwordreq:no; ` $acl = Get-Acl -Path $env:ZBX_HOME; ` $ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); ` diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index d54008bec..47dca970a 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -13,7 +13,7 @@ ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION ` - MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master ` + MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master ` POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" ` @@ -55,22 +55,23 @@ RUN Set-Location -Path $env:SystemDrive\.; ` ` Copy-Item -Path $env:SystemDrive\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agent2.exe $env:SystemDrive\zabbix2\sbin; ` Copy-Item -Path $env:SystemDrive\zabbix-$env:ZBX_VERSION\src\go\conf\zabbix_agent2.win.conf $env:SystemDrive\zabbix2\conf; ` - ` - 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 --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 $env:SystemDrive\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe; ` - Write-Host 'Verifying build ("zabbix-agent2-plugin-mongodb.exe -V") ...'; ` - & $env:SystemDrive\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe -V; ` - ` - 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 --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 $env:SystemDrive\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe; ` - Write-Host 'Verifying build ("zabbix-agent2-plugin-postgresql.exe -V") ...'; ` - & $env:SystemDrive\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe -V; ` - Write-Host 'Zabbix binaries are compiled...'; + ` + 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 --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 $env:SystemDrive\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe; ` + Write-Host 'Verifying build ("zabbix-agent2-plugin-mongodb.exe -V") ...'; ` + & $env:SystemDrive\mongodb_plugin\zabbix-agent2-plugin-mongodb.exe -V; ` + ` + 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 --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 $env:SystemDrive\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe; ` + Write-Host 'Verifying build ("zabbix-agent2-plugin-postgresql.exe -V") ...'; ` + & $env:SystemDrive\postgresql_plugin\zabbix-agent2-plugin-postgresql.exe -V; ` + Write-Host 'Zabbix binaries are compiled...'; ` + Remove-Item -Recurse -Force -Path $(go env GOCACHE);