enable timestamp on image (#556)
* enable timestamp on image * fix name issue
This commit is contained in:
2
fx.go
2
fx.go
@@ -19,7 +19,7 @@ import (
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||
)
|
||||
|
||||
const version = "0.9.44"
|
||||
const version = "0.9.45"
|
||||
|
||||
func init() {
|
||||
go checkForUpdate()
|
||||
|
||||
@@ -44,7 +44,7 @@ func Build(ctx context.Contexter) (err error) {
|
||||
language := ctx.Get("language").(string)
|
||||
host := ctx.Get("host").(string)
|
||||
kubeconf := ctx.Get("kubeconf").(string)
|
||||
name := ctx.Get("name").(string)
|
||||
name := fmt.Sprintf("%s-%s", ctx.Get("name").(string), time.Now().Format("20060102150405"))
|
||||
|
||||
if err := bundle.Bundle(workdir, language, fn, deps...); err != nil {
|
||||
return err
|
||||
@@ -63,7 +63,7 @@ func Build(ctx context.Contexter) (err error) {
|
||||
if err := docker.BuildImage(ctx.GetContext(), workdir, name); err != nil {
|
||||
return err
|
||||
}
|
||||
nameWithTag := name + ":latest"
|
||||
nameWithTag := fmt.Sprintf("%s:latest", name)
|
||||
if err := docker.TagImage(ctx.GetContext(), name, nameWithTag); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user