Verified Commit d067590a authored by Adrian Pascu's avatar Adrian Pascu
Browse files

Link the build timestamp to the CI job via `CI_JOB_URL`

parent 1c747384
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43,3 +43,4 @@ security:
      - "^HUGO_"
      - "^CI$"
      - "^CI_COMMIT_SHORT_SHA$"
      - "^CI_JOB_URL$"
+4 −1
Original line number Diff line number Diff line
{{ $builtLabel := printf "built %s UTC" (now.UTC.Format "2006-01-02 15:04") -}}
{{ with getenv "CI_COMMIT_SHORT_SHA" }}<a
  href="{{ site.Params.gitlab_path }}/commit/{{ . }}"
  >{{ . }}</a
>{{ else }}dev{{ end }} · built {{ now.UTC.Format "2006-01-02 15:04" }} UTC
>{{ else }}dev{{ end }} · {{ with getenv "CI_JOB_URL" }}<a href="{{ . }}"
  >{{ $builtLabel }}</a
>{{ else }}{{ $builtLabel }}{{ end }}