diff --git a/cmd/server/handlers.go b/cmd/server/handlers.go index 6b693d7..51288ff 100644 --- a/cmd/server/handlers.go +++ b/cmd/server/handlers.go @@ -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) diff --git a/cmd/server/main.go b/cmd/server/main.go index 90a9b4d..28ab282 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -40,6 +40,7 @@ var ( dbport string dbuser string dbpassword string + revision string ) func init() { @@ -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() { @@ -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