1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-06-15 00:15:15 +02:00

fixing deploy script

This commit is contained in:
Lee Brown
2019-08-13 17:08:19 -08:00
parent 56f7fb08b9
commit 09b4ff8171
6 changed files with 41 additions and 23 deletions

View File

@ -1,10 +1,13 @@
package main
import (
"context"
"expvar"
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
"log"
"os"
"strings"
"time"
"geeks-accelerator/oss/saas-starter-kit/tools/devops/cmd/cicd"
_ "github.com/lib/pq"
@ -111,7 +114,16 @@ func main() {
if err != nil {
return err
}
return cicd.ServiceDeploy(log, req)
// Set the context with the required values to
// process the request.
v := webcontext.Values{
Now: time.Now(),
Env: req.Env,
}
ctx := context.WithValue(context.Background(), webcontext.KeyValues, &v)
return cicd.ServiceDeploy(log, ctx, req)
},
},
{
@ -127,7 +139,16 @@ func main() {
if err != nil {
return err
}
return cicd.Migrate(log, req)
// Set the context with the required values to
// process the request.
v := webcontext.Values{
Now: time.Now(),
Env: req.Env,
}
ctx := context.WithValue(context.Background(), webcontext.KeyValues, &v)
return cicd.Migrate(log, ctx, req)
},
},
}