From 5ac0ecf5e1e4019b27492d96a86a5aca00be0718 Mon Sep 17 00:00:00 2001 From: Brandon Sprague Date: Sat, 28 Dec 2024 16:58:29 -0800 Subject: [PATCH] Update container for dashboard running And some other minor tweaks around directory creation --- async/async.go | 10 +++++++--- cmd/dashboard/configs/dev.conf | 2 +- cmd/dashboard/configs/local.conf | 2 +- cmd/dashboard/configs/test.conf | 3 +-- secrets/secrets.go | 3 +++ 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/async/async.go b/async/async.go index 934dfca..42a1985 100644 --- a/async/async.go +++ b/async/async.go @@ -299,15 +299,17 @@ const ( SurveyDir = ReportDir("survey") // Outputs - AnalysisOutputDir = ReportDir("analysis-output") - ReportOutputDir = ReportDir("report-output") - SummaryOutputDir = ReportDir("summary-output") + AnalysisOutputDir = ReportDir("analysis-output") + ReportOutputDir = ReportDir("report-output") + DashboardOutputDir = ReportDir("dashboard-output") + SummaryOutputDir = ReportDir("summary-output") ) func (r *TaskEnv) outputDirs() []string { return []string{ r.pathForDir(AnalysisOutputDir), r.pathForDir(ReportOutputDir), + r.pathForDir(DashboardOutputDir), r.pathForDir(SummaryOutputDir), } } @@ -322,6 +324,7 @@ func (r *TaskEnv) asEnvVars() []string { "SURVEY_DIR=" + r.pathForDir(SurveyDir), "ANALYSIS_OUTPUT_DIR=" + r.pathForDir(AnalysisOutputDir), "REPORT_OUTPUT_DIR=" + r.pathForDir(ReportOutputDir), + "DASHBOARD_OUTPUT_DIR=" + r.pathForDir(DashboardOutputDir), "SUMMARY_OUTPUT_DIR=" + r.pathForDir(SummaryOutputDir), } } @@ -351,6 +354,7 @@ func (r *TaskEnv) makeDirectories() error { // Outputs makeDir(AnalysisOutputDir) + makeDir(DashboardOutputDir) makeDir(ReportOutputDir) makeDir(SummaryOutputDir) diff --git a/cmd/dashboard/configs/dev.conf b/cmd/dashboard/configs/dev.conf index 77ea49c..6d63206 100644 --- a/cmd/dashboard/configs/dev.conf +++ b/cmd/dashboard/configs/dev.conf @@ -5,4 +5,4 @@ azure_event_topic pacta-events-dev azure_topic_location centralus-1 azure_storage_account rmipactadev -azure_dest_portfolio_container parsedportfolios +azure_dest_portfolio_container dashboards diff --git a/cmd/dashboard/configs/local.conf b/cmd/dashboard/configs/local.conf index 0b7eecd..a956915 100644 --- a/cmd/dashboard/configs/local.conf +++ b/cmd/dashboard/configs/local.conf @@ -5,4 +5,4 @@ azure_event_topic pacta-events-local azure_topic_location centralus-1 azure_storage_account rmipactalocal -azure_dest_portfolio_container parsedportfolios +azure_dest_portfolio_container dashboards diff --git a/cmd/dashboard/configs/test.conf b/cmd/dashboard/configs/test.conf index c416609..695119b 100644 --- a/cmd/dashboard/configs/test.conf +++ b/cmd/dashboard/configs/test.conf @@ -5,5 +5,4 @@ azure_event_topic pacta-events-test azure_topic_location westeurope-1 azure_storage_account rmipactatest -azure_dest_portfolio_container parsedportfolios - +azure_dest_portfolio_container dashboards diff --git a/secrets/secrets.go b/secrets/secrets.go index e1e656b..3ad01d3 100644 --- a/secrets/secrets.go +++ b/secrets/secrets.go @@ -212,6 +212,9 @@ func parseRunnerConfig(cfg *RawRunnerConfig) (RunnerConfig, error) { if cfg.Images.ParserName == "" { return RunnerConfig{}, errors.New("no runner_config.images.parser_name was provided") } + if cfg.Images.DashboardName == "" { + return RunnerConfig{}, errors.New("no runner_config.images.dashboard_name was provided") + } if cfg.Images.Registry == "" { return RunnerConfig{}, errors.New("no runner_config.images.registry was provided") }