This commit is contained in:
parent
8b7e7a3f85
commit
b90db27e15
@ -31,8 +31,8 @@ jobs:
|
|||||||
SAFE_REPO_NAME=$(echo $REPO_NAME | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
|
SAFE_REPO_NAME=$(echo $REPO_NAME | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
# 替换模板包名
|
# 替换模板包名
|
||||||
find src -type f -exec sed -i "s/zabbixagent2plugintemplate/$SAFE_REPO_NAME/g" {} +
|
find . -type f -exec sed -i "s/zabbixagent2plugintemplate/$SAFE_REPO_NAME/g" {} +
|
||||||
find src -type f -exec sed -i "s/Zabbix Agent 2 Plugin Template/$REPO_NAME/g" {} +
|
find . -type f -exec sed -i "s/Zabbix Agent 2 Plugin Template/$REPO_NAME/g" {} +
|
||||||
|
|
||||||
# # 记录文件修改
|
# # 记录文件修改
|
||||||
# - name: Commit files
|
# - name: Commit files
|
||||||
|
@ -5,5 +5,5 @@ RUN GOPROXY=https://goproxy.cn go mod download
|
|||||||
RUN CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o out/app
|
RUN CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o out/app
|
||||||
|
|
||||||
FROM zabbix/zabbix-agent2:ubuntu-7.0-latest
|
FROM zabbix/zabbix-agent2:ubuntu-7.0-latest
|
||||||
COPY --from=builder /build/out/app /usr/sbin/zabbix-agent2-plugin/onvif-agent
|
COPY --from=builder /build/out/app /usr/sbin/zabbix-agent2-plugin/zabbixagent2plugintemplate
|
||||||
RUN echo "Plugins.ONVIF.System.Path=/usr/sbin/zabbix-agent2-plugin/onvif-agent" >> /etc/zabbix/zabbix_agent2.d/plugins.d/onvif.conf
|
RUN echo "Plugins.zabbixagent2plugintemplate.System.Path=/usr/sbin/zabbix-agent2-plugin/zabbixagent2plugintemplate" >> /etc/zabbix/zabbix_agent2.d/plugins.d/zabbixagent2plugintemplate.conf
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
onvif-agent:
|
zabbixagent2plugintemplate:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
ZBX_HOSTNAME: ONVIF
|
ZBX_HOSTNAME: ONVIF
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
app:
|
app:
|
||||||
port: 8080
|
port: 8080
|
||||||
host: "0.0.0.0"
|
host: "0.0.0.0"
|
||||||
url: "http://onvif-agent:8080"
|
url: "http://zabbixagent2plugintemplate:8080"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user