Skip to content

Commit

Permalink
render_line_results: fix artifacts domain when running on inria gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
SkySkimmer committed Sep 9, 2023
1 parent 9192de5 commit 5a960e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dev/bench/render_line_results.ml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ let read_timing_lines file =
type html_data = { link_prefix : string }

let get_html_data () =
match Sys.getenv_opt "CI_PROJECT_NAMESPACE",
match Sys.getenv_opt "CI_PAGES_DOMAIN",
Sys.getenv_opt "CI_PROJECT_NAMESPACE",
Sys.getenv_opt "CI_PROJECT_NAME",
Sys.getenv_opt "CI_JOB_ID" with
| Some ns, Some project, Some id ->
| Some domain, Some ns, Some project, Some id ->
Some { link_prefix =
Printf.sprintf "https://%s.gitlab.io/-/%s/-/jobs/%s/artifacts/_bench/html/"
ns project id }
| None, _, _ | _, None, _ | _, _, None -> None
Printf.sprintf "https://%s.%s/-/%s/-/jobs/%s/artifacts/_bench/html/"
ns domain project id }
| None, _, _, _ | _, None, _, _ | _, _, None, _ | _, _, _, None -> None

let html_str ?html lnum s = match html with
| None -> Table.raw_str s
Expand Down

0 comments on commit 5a960e1

Please sign in to comment.