Skip to content

Commit

Permalink
Update Dashboard + add missing mount (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcspragu authored Jan 15, 2025
1 parent 6c542ef commit 00cef75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ oci_pull(

oci_pull(
name = "dashboard_base",
# This digest is of the 'main' tag as of 2024-12-19
digest = "sha256:dea705bac105a0847a6070f1914298fb7145273bc4a56b76ba8ec80ce427e269",
# This digest is of the 'main' tag as of 2025-01-14
digest = "sha256:9ce17409844359e168280ba7c432d5da740738b3e6e0596eeaa7b239772d48fe",
image = "ghcr.io/rmi-pacta/workflow.pacta.dashboard",
platforms = ["linux/amd64"],
)
24 changes: 14 additions & 10 deletions async/async.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ func (r *TaskEnv) asEnvVars() []string {
"ANALYSIS_OUTPUT_DIR=" + r.pathForDir(AnalysisOutputDir),
"REPORT_OUTPUT_DIR=" + r.pathForDir(ReportOutputDir),
"DASHBOARD_OUTPUT_DIR=" + r.pathForDir(DashboardOutputDir),
"DASHBOARD_DATA_DIR=" + filepath.Join(r.pathForDir(DashboardOutputDir), "data"),
"SUMMARY_OUTPUT_DIR=" + r.pathForDir(SummaryOutputDir),
}
}
Expand All @@ -436,28 +437,31 @@ func (r *TaskEnv) pathForDir(d ReportDir) string {

func (r *TaskEnv) makeDirectories() error {
var rErr error
makeDir := func(reportDir ReportDir) {
makeDir := func(dir string) {
if rErr != nil {
return
}
dir := r.pathForDir(reportDir)
if err := os.Mkdir(dir, 0700); err != nil {
rErr = fmt.Errorf("failed to create dir %q: %w", dir, err)
return
}
}
makeReportDir := func(reportDir ReportDir) {
makeDir(r.pathForDir(reportDir))
}

// Inputs
makeDir(PortfoliosDir)
makeDir(RealEstateDir) // Used as part of specific projects, empty for now.
makeDir(ScoreCardDir) // Used as part of specific projects, empty for now.
makeDir(SurveyDir) // Used as part of specific projects, empty for now.
makeReportDir(PortfoliosDir)
makeReportDir(RealEstateDir) // Used as part of specific projects, empty for now.
makeReportDir(ScoreCardDir) // Used as part of specific projects, empty for now.
makeReportDir(SurveyDir) // Used as part of specific projects, empty for now.

// Outputs
makeDir(AnalysisOutputDir)
makeDir(DashboardOutputDir)
makeDir(ReportOutputDir)
makeDir(SummaryOutputDir)
makeReportDir(AnalysisOutputDir)
makeReportDir(DashboardOutputDir)
makeDir(filepath.Join(r.pathForDir(DashboardOutputDir), "data"))
makeReportDir(ReportOutputDir)
makeReportDir(SummaryOutputDir)

if rErr != nil {
return rErr
Expand Down

0 comments on commit 00cef75

Please sign in to comment.