feat: 默认api应用的host和path
continuous-integration/drone/push Build is passing Details

master
icechen 2022-01-05 16:59:02 +08:00
parent 9d1867e70f
commit 3bbe609404
3 changed files with 17 additions and 1 deletions

View File

@ -10,7 +10,7 @@ ADD . .
RUN go mod tidy RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o main 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 WORKDIR /go/src
#LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>" #LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo

View File

@ -43,8 +43,16 @@ steps:
- image=reg.icechen.cn/{{ .NameSpace }}/api-{{ .Name }} - image=reg.icechen.cn/{{ .NameSpace }}/api-{{ .Name }}
- imageTag=${DRONE_TAG} - imageTag=${DRONE_TAG}
- port={{ .Port }} - port={{ .Port }}
{{ if .Host }}
- host={{ .Host }} - host={{ .Host }}
{{ else }}
- host=api.zeus.seamlesser.com
{{ end }}
{{ if .Path }}
- path={{ .Path }} - path={{ .Path }}
{{ else }}
- path=/{{ .NameSpace }}/{{ .Name }}
{{ end }}
volumes: volumes:
- name: docker - name: docker

View File

@ -43,8 +43,16 @@ steps:
- image=reg.icechen.cn/{{ .NameSpace }}/api-{{ .Name }} - image=reg.icechen.cn/{{ .NameSpace }}/api-{{ .Name }}
- imageTag=${DRONE_COMMIT:0:8} - imageTag=${DRONE_COMMIT:0:8}
- port={{ .Port }} - port={{ .Port }}
{{ if .Host }}
- host=t{{ .Host }} - host=t{{ .Host }}
{{ else }}
- host=tapi.zeus.seamlesser.com
{{ end }}
{{ if .Path }}
- path={{ .Path }} - path={{ .Path }}
{{ else }}
- path=/{{ .NameSpace }}/{{ .Name }}
{{ end }}
volumes: volumes:
- name: docker - name: docker