Liking cljdoc? Tell your friends :D

com.blockether.spel.ci

CI utilities for assembling Allure report sites.

Replaces Python scripts in GitHub Actions workflow with native Clojure.

Usage: spel ci-assemble --help spel ci-assemble --site-dir=gh-pages-site --run=123 ...

CI utilities for assembling Allure report sites.

Replaces Python scripts in GitHub Actions workflow with native Clojure.

Usage:
  spel ci-assemble --help
  spel ci-assemble --site-dir=gh-pages-site --run=123 ...
raw docstring

-mainclj

(-main & args)

Main entry point for ci-assemble command.

Main entry point for ci-assemble command.
sourceraw docstring

finalize-build!clj

(finalize-build! {:keys [site-dir run-number passed status]})

Update a build from in-progress to completed/failed/cancelled. Removes the 'in_progress' status from builds-meta.json. Should be called before generate-builds-metadata! which will regenerate builds.json with full test results.

Options: :site-dir - path to gh-pages-site directory :run-number - CI run number (string) :passed - whether tests passed (boolean) :status - override status (e.g. 'cancelled', default: 'completed')

Update a build from in-progress to completed/failed/cancelled.
Removes the 'in_progress' status from builds-meta.json.
Should be called before generate-builds-metadata! which will
regenerate builds.json with full test results.

Options:
  :site-dir    - path to gh-pages-site directory
  :run-number  - CI run number (string)
  :passed      - whether tests passed (boolean)
  :status      - override status (e.g. 'cancelled', default: 'completed')
sourceraw docstring

finalize-pr-build!clj

(finalize-pr-build! {:keys [site-dir pr-number passed status test-counts]})

Update a PR build from in-progress to completed/cancelled with test results.

Options: :site-dir - path to site directory :pr-number - GitHub PR number :passed - whether tests passed (boolean) :status - override status (e.g. 'cancelled', default: 'completed') :test-counts - map with :passed :failed :broken :skipped :total

Update a PR build from in-progress to completed/cancelled with test results.

Options:
  :site-dir    - path to site directory
  :pr-number   - GitHub PR number
  :passed      - whether tests passed (boolean)
  :status      - override status (e.g. 'cancelled', default: 'completed')
  :test-counts - map with :passed :failed :broken :skipped :total
sourceraw docstring

generate-builds-metadata!clj

(generate-builds-metadata! {:keys [site-dir run-number commit-sha commit-msg
                                   commit-author commit-ts tests-passed repo-url
                                   run-url version version-badge test-counts]})

Generate builds.json and update builds-meta.json with current run info.

Options: :site-dir - path to gh-pages-site directory :run-number - current CI run number :commit-sha - full commit SHA :commit-msg - commit message :commit-author - commit author name :commit-ts - commit timestamp (ISO 8601) :tests-passed - whether tests passed (boolean) :repo-url - repository URL :run-url - CI run URL :version - project version :version-badge - version badge type (release/candidate) :test-counts - map with :passed :failed :broken :skipped :total

Generate builds.json and update builds-meta.json with current run info.

Options:
  :site-dir     - path to gh-pages-site directory
  :run-number   - current CI run number
  :commit-sha   - full commit SHA
   :commit-msg   - commit message
   :commit-author - commit author name
   :commit-ts    - commit timestamp (ISO 8601)
   :tests-passed - whether tests passed (boolean)
   :repo-url     - repository URL
   :run-url      - CI run URL
   :version      - project version
   :version-badge - version badge type (release/candidate)
   :test-counts  - map with :passed :failed :broken :skipped :total
sourceraw docstring

mark-prs-merged!clj

(mark-prs-merged! {:keys [site-dir merged-prs]})

Mark specified PRs as merged in pr-builds.json.

Options: :site-dir - path to site directory :merged-prs - sequence of PR numbers to mark as merged

Mark specified PRs as merged in pr-builds.json.

Options:
  :site-dir   - path to site directory
  :merged-prs - sequence of PR numbers to mark as merged
sourceraw docstring

parse-argsclj

(parse-args args)

Parse CLI arguments into options map.

Parse CLI arguments into options map.
sourceraw docstring

patch-allure-history!clj

(patch-allure-history! {:keys [history-file report-url commit-sha commit-msg
                               run-number]})

Patch .allure-history.jsonl with URL and commit info for the latest entry.

Options: :history-file - path to .allure-history.jsonl (default: .allure-history.jsonl) :report-url - URL to inject into latest entry :commit-sha - full commit SHA :commit-msg - commit message (first line used) :run-number - CI run number

Patch .allure-history.jsonl with URL and commit info for the latest entry.

Options:
  :history-file - path to .allure-history.jsonl (default: .allure-history.jsonl)
  :report-url   - URL to inject into latest entry
  :commit-sha   - full commit SHA
  :commit-msg   - commit message (first line used)
  :run-number   - CI run number
sourceraw docstring

patch-index-html!clj

(patch-index-html! {:keys [index-file logo-file title subtitle]})

Patch index.html with logo and title placeholders.

Options: :index-file - path to index.html :logo-file - path to logo.svg (optional) :title - title to inject (optional) :subtitle - subtitle to inject (optional)

Patch index.html with logo and title placeholders.

Options:
  :index-file    - path to index.html
  :logo-file     - path to logo.svg (optional)
  :title         - title to inject (optional)
  :subtitle      - subtitle to inject (optional)
sourceraw docstring

register-build-start!clj

(register-build-start! {:keys [site-dir run-number commit-sha commit-msg
                               commit-author repo-url run-url version
                               version-badge]})

Register a build as in-progress. Adds entry to builds-meta.json and regenerates builds.json so the landing page shows a yellow 'In Progress' badge.

Options: :site-dir - path to gh-pages-site directory :run-number - CI run number (string) :commit-sha - full commit SHA :commit-msg - commit message :commit-author - commit author name :repo-url - repository URL :run-url - CI run URL :version - project version :version-badge - version badge type

Register a build as in-progress. Adds entry to builds-meta.json and
regenerates builds.json so the landing page shows a yellow 'In Progress' badge.

Options:
  :site-dir    - path to gh-pages-site directory
  :run-number  - CI run number (string)
  :commit-sha  - full commit SHA
  :commit-msg  - commit message
  :commit-author - commit author name
  :repo-url    - repository URL
  :run-url     - CI run URL
  :version     - project version
  :version-badge - version badge type
sourceraw docstring

register-pr-build!clj

(register-pr-build! {:keys [site-dir pr-number pr-title branch sha author
                            run-number run-url repo-url version version-badge
                            status tests-passed test-counts max-pr-builds
                            pr-url]})

Register or update a PR build entry in pr-builds.json.

Options: :site-dir - path to site directory (default: gh-pages-site) :pr-number - PR number (required) :pr-title - PR title :branch - PR head branch :sha - head commit SHA :author - PR author :run-number - workflow run number :run-url - CI run URL :repo-url - repository URL :version - project version :version-badge - version badge type :status - build status (default: in_progress) :tests-passed - whether tests passed (boolean, nil for unknown) :test-counts - map with :passed :failed :broken :skipped :total :max-pr-builds - maximum PR entries to keep (default: 50) :pr-url - direct URL to the PR (e.g. GitHub/GitLab/Bitbucket)

Register or update a PR build entry in pr-builds.json.

Options:
  :site-dir      - path to site directory (default: gh-pages-site)
  :pr-number     - PR number (required)
  :pr-title      - PR title
  :branch        - PR head branch
  :sha           - head commit SHA
  :author        - PR author
  :run-number    - workflow run number
  :run-url       - CI run URL
  :repo-url      - repository URL
  :version       - project version
  :version-badge - version badge type
  :status        - build status (default: in_progress)
  :tests-passed  - whether tests passed (boolean, nil for unknown)
  :test-counts   - map with :passed :failed :broken :skipped :total
  :max-pr-builds - maximum PR entries to keep (default: 50)
  :pr-url        - direct URL to the PR (e.g. GitHub/GitLab/Bitbucket)
sourceraw docstring

update-pr-statuses!clj

(update-pr-statuses! {:keys [site-dir failing-prs]})

Update PR build pass/fail status based on actual CI check results. Corrects status when external CI workflows (not just Allure) fail.

Options: :site-dir - path to site directory :failing-prs - sequence of PR numbers that have failing checks

Update PR build pass/fail status based on actual CI check results.
Corrects status when external CI workflows (not just Allure) fail.

Options:
  :site-dir     - path to site directory
  :failing-prs  - sequence of PR numbers that have failing checks
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close