mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 03:37:46 +08:00
[REV] update delete plugin,change monitor build
This commit is contained in:
parent
30454ded8b
commit
7360474a37
@ -1494,11 +1494,12 @@ func (s *ServiceAction) VolumnVar(tsv *dbmodel.TenantServiceVolume, tenantID, ac
|
||||
}
|
||||
case "delete":
|
||||
if tsv.VolumeName != "" {
|
||||
if err := db.GetManager().TenantServiceVolumeDao().DeleteModel(tsv.ServiceID, tsv.VolumeName); err != nil {
|
||||
err := db.GetManager().TenantServiceVolumeDao().DeleteModel(tsv.ServiceID, tsv.VolumeName)
|
||||
if err != nil && err.Error() != gorm.ErrRecordNotFound.Error() {
|
||||
return util.CreateAPIHandleErrorFromDBError("delete volume", err)
|
||||
}
|
||||
} else {
|
||||
if err := db.GetManager().TenantServiceVolumeDao().DeleteByServiceIDAndVolumePath(tsv.ServiceID, tsv.VolumePath); err != nil {
|
||||
if err := db.GetManager().TenantServiceVolumeDao().DeleteByServiceIDAndVolumePath(tsv.ServiceID, tsv.VolumePath); err != nil && err.Error() != gorm.ErrRecordNotFound.Error() {
|
||||
return util.CreateAPIHandleErrorFromDBError("delete volume", err)
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ func (s *PluginShareHandle) ShareResult(shareID string) (i exector.ShareStatus,
|
||||
e = util.CreateAPIHandleError(500, err)
|
||||
} else {
|
||||
if res.Count == 0 {
|
||||
i.ShareID = "shareID"
|
||||
i.ShareID = shareID
|
||||
} else {
|
||||
if err := ffjson.Unmarshal(res.Kvs[0].Value, &i); err != nil {
|
||||
return i, util.CreateAPIHandleError(500, err)
|
||||
|
@ -133,7 +133,7 @@ func (s *ServiceShareHandle) ShareResult(shareID string) (i exector.ShareStatus,
|
||||
e = util.CreateAPIHandleError(500, err)
|
||||
} else {
|
||||
if res.Count == 0 {
|
||||
i.ShareID = "shareID"
|
||||
i.ShareID = shareID
|
||||
} else {
|
||||
if err := ffjson.Unmarshal(res.Kvs[0].Value, &i); err != nil {
|
||||
return i, util.CreateAPIHandleError(500, err)
|
||||
|
@ -1,9 +1,10 @@
|
||||
FROM prom/prometheus
|
||||
FROM prom/prometheus:v2.2.1
|
||||
|
||||
VOLUME ["/prometheusdata"]
|
||||
|
||||
ENV RELEASE_DESC=__RELEASE_DESC__
|
||||
|
||||
ADD /rainbond-monitor /usr/bin/monitor
|
||||
ADD rainbond-monitor /run/monitor
|
||||
|
||||
ENTRYPOINT /usr/bin/monitor
|
||||
ENTRYPOINT [""]
|
||||
CMD [ "/run/monitor" ]
|
@ -56,6 +56,8 @@ function build::image() {
|
||||
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} goodraim.me/event-build:v1 go build -ldflags '-w -s' -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/eventlog
|
||||
elif [ "$1" = "chaos" ];then
|
||||
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:1.8.3 go build -ldflags '-w -s' -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/builder
|
||||
elif [ "$1" = "monitor" ];then
|
||||
GOOS=linux go build -ldflags '-w -s' -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/builder
|
||||
else
|
||||
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:1.8.3 go build -ldflags '-w -s' -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/$1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user