feat: 增加 AppName 注入
continuous-integration/drone/push Build is passing Details

master
icechen 2022-01-11 02:02:24 +08:00
parent e9a4a3925c
commit d7de7996ff
4 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@ steps:
namespace: {{ .NameSpace }} namespace: {{ .NameSpace }}
values: values:
- nameSpace={{ .NameSpace }} - nameSpace={{ .NameSpace }}
- appName={{ .Name }}
- aliasName={{ .AliasName }} - aliasName={{ .AliasName }}
- image={{ .Reg.Registry }}/{{ .NameSpace }}/api-{{ .Name }} - image={{ .Reg.Registry }}/{{ .NameSpace }}/api-{{ .Name }}
- imageTag=${DRONE_TAG} - imageTag=${DRONE_TAG}

View File

@ -34,6 +34,7 @@ steps:
namespace: {{ .NameSpace }} namespace: {{ .NameSpace }}
values: values:
- nameSpace={{ .NameSpace }} - nameSpace={{ .NameSpace }}
- appName={{ .Name }}
- aliasName={{ .AliasName }} - aliasName={{ .AliasName }}
- image={{ .Reg.Registry }}/{{ .NameSpace }}/api-{{ .Name }} - image={{ .Reg.Registry }}/{{ .NameSpace }}/api-{{ .Name }}
- imageTag=${DRONE_COMMIT:0:8} - imageTag=${DRONE_COMMIT:0:8}

View File

@ -34,6 +34,7 @@ steps:
namespace: {{ .NameSpace }} namespace: {{ .NameSpace }}
values: values:
- nameSpace={{ .NameSpace }} - nameSpace={{ .NameSpace }}
- appName={{ .Name }}
- aliasName={{ .AliasName }} - aliasName={{ .AliasName }}
- image={{ .Reg.Registry }}/{{ .NameSpace }}/service-{{ .Name }} - image={{ .Reg.Registry }}/{{ .NameSpace }}/service-{{ .Name }}
- imageTag=${DRONE_TAG} - imageTag=${DRONE_TAG}

View File

@ -1,6 +1,6 @@
package go_handler_template package go_handler_template
const ServiceTestPipeline = ` const ServiceTestPipeline string = `
kind: pipeline kind: pipeline
type: docker type: docker
name: test-service-{{ .Name }}.{{ .NameSpace }} name: test-service-{{ .Name }}.{{ .NameSpace }}
@ -34,6 +34,7 @@ steps:
namespace: {{ .NameSpace }} namespace: {{ .NameSpace }}
values: values:
- nameSpace={{ .NameSpace }} - nameSpace={{ .NameSpace }}
- appName={{ .Name }}
- aliasName={{ .AliasName }} - aliasName={{ .AliasName }}
- image={{ .Reg.Registry }}/{{ .NameSpace }}/service-{{ .Name }} - image={{ .Reg.Registry }}/{{ .NameSpace }}/service-{{ .Name }}
- imageTag=${DRONE_COMMIT:0:8} - imageTag=${DRONE_COMMIT:0:8}