diff --git a/Dockerfile b/Dockerfile index 110ef13..fb9d8c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ADD . . RUN go mod tidy RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o main -FROM alpine as drone_plugin +FROM reg.icechen.cn/alpine as drone_plugin WORKDIR /go/src #LABEL maintainer "The Prometheus Authors " COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo diff --git a/go_handler/go_handler_template/go_api_production_pipeline.go b/go_handler/go_handler_template/go_api_production_pipeline.go index a0e51f9..620764c 100644 --- a/go_handler/go_handler_template/go_api_production_pipeline.go +++ b/go_handler/go_handler_template/go_api_production_pipeline.go @@ -43,8 +43,16 @@ steps: - image=reg.icechen.cn/{{ .NameSpace }}/api-{{ .Name }} - imageTag=${DRONE_TAG} - port={{ .Port }} +{{ if .Host }} - host={{ .Host }} +{{ else }} + - host=api.zeus.seamlesser.com +{{ end }} +{{ if .Path }} - path={{ .Path }} +{{ else }} + - path=/{{ .NameSpace }}/{{ .Name }} +{{ end }} volumes: - name: docker diff --git a/go_handler/go_handler_template/go_api_test_pipeline.go b/go_handler/go_handler_template/go_api_test_pipeline.go index 4d3960e..f802338 100644 --- a/go_handler/go_handler_template/go_api_test_pipeline.go +++ b/go_handler/go_handler_template/go_api_test_pipeline.go @@ -43,8 +43,16 @@ steps: - image=reg.icechen.cn/{{ .NameSpace }}/api-{{ .Name }} - imageTag=${DRONE_COMMIT:0:8} - port={{ .Port }} +{{ if .Host }} - host=t{{ .Host }} +{{ else }} + - host=tapi.zeus.seamlesser.com +{{ end }} +{{ if .Path }} - path={{ .Path }} +{{ else }} + - path=/{{ .NameSpace }}/{{ .Name }} +{{ end }} volumes: - name: docker