clue/deploy/configs

clue.deploy.yaml / clue.deploy.json configuration for the clue deploy system. Parsed into Nim objects via openparser's typed deserializers (fromJson / parseYAML), so both formats share one object graph.

Types

DeployConfig = object
  path*: string
  project*: string
  version*: string
  github*: GithubConfig
  release*: ReleaseConfig
  web*: WebConfig
GithubConfig = object
  repo*: string
ReleaseConfig = object
  repo*: string
  tagPrefix*: string
  notes*: string
  notesFile*: string
  draft*: bool
  prerelease*: bool
  assets*: seq[string]
  workflow*: string
  targets*: seq[ReleaseTarget]
  artifactName*: string
ReleaseTarget = object
  os*: string
  arch*: string
SystemdConfig = object
  service*: string
  unitFile*: string
  unitRemotePath*: string
  daemonReload*: Option[bool]
  enable*: bool
  restart*: Option[bool]
  sudo*: Option[bool]
  status*: Option[bool]
WebConfig = object
  localDir*: string
  profiles*: OrderedTableRef[string, WebProfile]
WebProfile = object
  name*: string
  host*: string
  user*: string
  port*: int
  sshKey*: string
  remoteDir*: string
  exclude*: seq[string]
  delete*: bool
  checksum*: bool
  compress*: Option[bool]
  partial*: Option[bool]
  timeout*: int
  preBuild*: seq[string]
  postDeploy*: seq[string]
  systemd*: SystemdConfig

Procs

func compressOn(p: WebProfile): bool {....raises: [], tags: [], forbids: [].}
proc expandPath(s: string): string {....raises: [],
                                     tags: [ReadEnvEffect, ReadIOEffect],
                                     forbids: [].}
Expand ~ and $VAR / ${VAR} in a config value (e.g. an ssh key path).
proc findDeployConfig(customPath = ""): string {....raises: [IOError, OSError],
    tags: [ReadDirEffect], forbids: [].}
Locate the deploy config in the current directory (or customPath).
proc parseDeployConfig(path: string): DeployConfig {....raises: [IOError,
    OpenParserJsonError, ValueError, OpenParserYamlError, KeyError, Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect], forbids: [].}
Parse a clue.deploy.yaml / clue.deploy.json file into a DeployConfig.
func partialOn(p: WebProfile): bool {....raises: [], tags: [], forbids: [].}
func sdDaemonReload(s: SystemdConfig): bool {....raises: [], tags: [], forbids: [].}
func sdRestart(s: SystemdConfig): bool {....raises: [], tags: [], forbids: [].}
func sdStatus(s: SystemdConfig): bool {....raises: [], tags: [], forbids: [].}
func sdSudo(s: SystemdConfig): bool {....raises: [], tags: [], forbids: [].}