Removed Go build cache

This commit is contained in:
Alexey Pustovalov 2022-12-15 13:54:48 +09:00
parent d83d9b3b41
commit 5e0fb5d0bb
2 changed files with 22 additions and 21 deletions

View File

@ -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'); `

View File

@ -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);