Skip to content

Commit

Permalink
feature. add server argument revision
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkfree committed Apr 4, 2022
1 parent 6c832e5 commit 5243ce7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (s *server) CreateContract(ctx context.Context, in *pb.CreateContractReques
nameSpace := "argo"
parameters := []string{
"contract_id=" + contractId.String(),
"revision=" + revision,
}

workflowName, err := argowfClient.SumbitWorkflowFromWftpl(ctx, workflowTemplate, nameSpace, parameters)
Expand Down
3 changes: 3 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var (
dbport string
dbuser string
dbpassword string
revision string
)

func init() {
Expand All @@ -56,6 +57,7 @@ func init() {
flag.StringVar(&dbport, "dbport", "5432", "port of postgreSQL")
flag.StringVar(&dbuser, "dbuser", "postgres", "postgreSQL user")
flag.StringVar(&dbpassword, "dbpassword", "password", "password for postgreSQL user")
flag.StringVar(&revision, "revision", "main", "revision for workflow parameter")
}

func main() {
Expand All @@ -75,6 +77,7 @@ func main() {
log.Info("dbport : ", dbport)
log.Info("dbuser : ", dbuser)
log.Info("dbpassword : ", dbpassword)
log.Info("revision : ", revision)
log.Info("****************** ")

// initialize database
Expand Down

0 comments on commit 5243ce7

Please sign in to comment.