added oc monitor cwd to conf for better handling of filesé
This commit is contained in:
@@ -6,6 +6,7 @@ package workflow_builder
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"oc-monitor/conf"
|
||||
"oc-monitor/logger"
|
||||
. "oc-monitor/models"
|
||||
"os"
|
||||
@@ -40,7 +41,7 @@ type Spec struct {
|
||||
}
|
||||
|
||||
func (b *ArgoBuilder) CreateDAG() (string, error) {
|
||||
|
||||
|
||||
b.createTemplates()
|
||||
b.createDAGstep()
|
||||
b.createVolumes()
|
||||
@@ -60,7 +61,7 @@ func (b *ArgoBuilder) CreateDAG() (string, error) {
|
||||
// Give a unique name to each argo file with its timestamp DD:MM:YYYY_hhmmss
|
||||
current_timestamp := time.Now().Format("02_01_2006_150405")
|
||||
file_name := random_name + "_" + current_timestamp + ".yml"
|
||||
workflows_dir := "argo_workflows/"
|
||||
workflows_dir := conf.GetConfig().MonitorDir+"/argo_workflows/"
|
||||
err = os.WriteFile(workflows_dir+file_name, []byte(yamlified), 0660)
|
||||
if err != nil {
|
||||
logger.Logger.Error().Msg("Could not write the yaml file")
|
||||
|
||||
Reference in New Issue
Block a user