Liking cljdoc? Tell your friends :D

monkey.ci.api

Api functions, which can be invoked by build scripts. These often delegate to more specific namespaces, but this namespace is provided as a convenient entry point.

The general intention is to provide functions for most purposes, without the user having to resort to using keywords and maps.

Api functions, which can be invoked by build scripts.  These often delegate
to more specific namespaces, but this namespace is provided as a convenient
entry point.

The general intention is to provide functions for most purposes, without the user
having to resort to using keywords and maps.
raw docstring

action-jobclj

Declares an action job with id, action and options

Declares an action job with id, action and options
raw docstring

action-job?clj

Checks if argument is an action job

Checks if argument is an action job
raw docstring

added?clj

Checks if files have been added in this build using the given predicate, which can either be a regex, a string or a matcher function. Accepts one or two arguments: when given one argument, returns a function that accepts the context to check if the predicate matches. When given two arguments, accepts the context and the predicate.

Checks if files have been added in this build using the given predicate, which can either be a
regex, a string or a matcher function.  Accepts one or two arguments: when given one argument,
returns a function that accepts the context to check if the predicate matches.  When given two
arguments, accepts the context and the predicate.
raw docstring

api-trigger?clj

True if the build has been triggered via api (i.e. typically manually by a human)

True if the build has been triggered via api (i.e. typically manually by a human)
raw docstring

archsclj

Retrieves list of available container architectures from context

Retrieves list of available container architectures from context
raw docstring

artifactclj

(artifact id path)

Defines a new artifact with given id, located at given path. This can be passed to save-artifacts or restore-artifacts.

Defines a new artifact with given id, located at given `path`.  This can be passed
to `save-artifacts` or `restore-artifacts`.
raw docstring

bashclj

(bash id & cmds)

Creates an action job that executes given commands in a bash shell

Creates an action job that executes given commands in a bash shell
raw docstring

blockedclj

(blocked job)

Gets or sets job blocked status. A blocked job will be marked as blocked once it is eligible for execution. An explicit unblock action is required to execute it.

Gets or sets job blocked status.  A blocked job will be marked as `blocked` once it
is eligible for execution.  An explicit unblock action is required to execute it.
raw docstring

blocked?clj

Checks if given job is marked as blocked

Checks if given job is marked as blocked
raw docstring

branchclj

Gets commit branch from the context.

Gets commit branch from the context.
raw docstring

build-idclj

Returns current build id

Returns current build id
raw docstring

build-paramsclj

Retrieves parameters this build has access to

Retrieves parameters this build has access to
raw docstring

cacheclj

Defines a cache with given id an path, that can be passed to caches

Defines a cache with given id an path, that can be passed to `caches`
raw docstring

cachesclj

Configures the caches a job uses.

Configures the caches a job uses.
raw docstring

checkout-dirclj

Returns the build checkout directory

Returns the build checkout directory
raw docstring

cli?clj

True if the build has been triggered from the cli

True if the build has been triggered from the cli
raw docstring

container-jobclj

(container-job id & [opts])

Declares an container job with id and container options

Declares an container job with id and container options
raw docstring

container-job?clj

Checks if argument is an container job

Checks if argument is an container job
raw docstring

dependenciesclj

Gets the configured dependencies of a job

Gets the configured dependencies of a job
raw docstring

depends-onclj

(depends-on job & deps)

Adds dependencies to the given job. Does not overwrite existing dependencies.

Adds dependencies to the given job.  Does not overwrite existing dependencies.
raw docstring

dir-artifactclj

(dir-artifact art)

Converts artifact that points to a file, to one that points to its parent directory. If there is no parent directory, uses the current directory.

Converts artifact that points to a file, to one that points to its parent
directory.  If there is no parent directory, uses the current directory.
raw docstring

envclj

(env job)
(env job e)

Gets or sets environment vars for the job

Gets or sets environment vars for the job
raw docstring

errorclj

Same as failure

Same as `failure`
raw docstring

exposeclj

(expose job)
(expose job ports)

Gets or sets exposed ports

Gets or sets exposed ports
raw docstring

failedclj

Same as failure

Same as `failure`
raw docstring

failureclj

Indicates the job has failed

Indicates the job has failed
raw docstring

files-addedclj

List of files that have been added for this build

List of files that have been added for this build
raw docstring

files-modifiedclj

List of modified files for this build

List of modified files for this build
raw docstring

files-removedclj

List of removed files for this build

List of removed files for this build
raw docstring

get-artifactclj

(get-artifact ctx {:keys [path] :as art})

Retrieves artifact with given id and restores it at the location indicated by the archive path. Returns the restored artifact path, or nil if the artifact was not found.

Retrieves artifact with given id and restores it at the location indicated
by the archive `path`.
Returns the restored artifact path, or `nil` if the artifact was not found.
raw docstring

get-jobclj

(get-job ctx id)

Retrieves job by id in the current build

Retrieves job by id in the current build
raw docstring

get-job-exposed-addrclj

(get-job-exposed-addr ctx id port)

If the given job exposes a port, looks it up in the context and returns the externally accessible address as a map with :port and :address keys. If the job is not found, or the given port is not mapped, returns nil.

If the given job exposes a port, looks it up in the context and returns the
externally accessible address as a map with `:port` and `:address` keys.  If
the job is not found, or the given port is not mapped, returns `nil`.
raw docstring

git-refclj

The git ref that triggered the build

The git ref that triggered the build
raw docstring

homeclj


imageclj

(image job)
(image job img)

Gets or sets container image

Gets or sets container image
raw docstring

in-workclj

(in-work ctx p)

Given a relative path p, returns it as a subpath to the job working directory. Fails if an absolute path is given.

Given a relative path `p`, returns it as a subpath to the job working directory.
Fails if an absolute path is given.
raw docstring

initclj

(init job)
(init job init)

Gets or sets container job initializer

Gets or sets container job initializer
raw docstring

job-idclj

Gets the id of the given job

Gets the id of the given job
raw docstring

job-resultcljmultimethod

Retrieves the result of the job, if it has finished

Retrieves the result of the job, if it has finished
raw docstring

job-work-dirclj

(job-work-dir ctx)

Gets the work dir for the current job in the context as an absolute path

Gets the work dir for the current job in the context as an absolute path
raw docstring

main-branchclj

Gets configured main branch from the build.

Gets configured main branch from the build.
raw docstring

main-branch?clj

Checks if the build branch is the configured main branch.

Checks if the build branch is the configured main branch.
raw docstring

manual?clj

Alias for api-trigger?

Alias for `api-trigger?`
raw docstring

modified?clj

Checks if files have been modified in this build using the given predicate, which can either be a regex, a string or a matcher function. Similar to added?.

Checks if files have been modified in this build using the given predicate, which can either be a
regex, a string or a matcher function.  Similar to `added?`.
raw docstring

param-to-fileclj

(param-to-file ctx param out)

Takes the value of param from the build parameters and writes it to the file at path out. Creates any directories as needed. Returns nil if the operation succeeded.

Takes the value of `param` from the build parameters and writes it to 
the file at path `out`.  Creates any directories as needed.  Returns 
`nil` if the operation succeeded.
raw docstring

paramsclj

Shorthand for build-params

Shorthand for `build-params`
raw docstring

ref-regexclj

Applies the given regex on the ref from the context, returns the matching groups.

Applies the given regex on the ref from the context, returns the matching groups.
raw docstring

removed?clj

Checks if files have been removed in this build using the given predicate, which can either be a regex, a string or a matcher function. Similar to added?.

Checks if files have been removed in this build using the given predicate, which can either be a
regex, a string or a matcher function.  Similar to `added?`.
raw docstring

restore-artifactclj

Alias for get-artifact

Alias for `get-artifact`
raw docstring

restore-artifactsclj

Configures the artifacts to restore on a job.

Configures the artifacts to restore on a job.
raw docstring

save-artifactsclj

Configures the artifacts to save on a job.

Configures the artifacts to save on a job.
raw docstring

scriptclj

(script job)
(script job script)

Gets or sets container job script

Gets or sets container job script
raw docstring

shellclj

Same as bash

Same as `bash`
raw docstring

sizeclj

(size job)
(size job s)

Gets or sets the resource size of the container job. Size 1 means 1 cpu, 2 GB, size 2 doubles that, etc...

Gets or sets the resource size of the container job.  Size 1 means 1 cpu,
2 GB, size 2 doubles that, etc...
raw docstring

skippedclj

Indicates the job was intentionally skipped

Indicates the job was intentionally skipped
raw docstring

sourceclj

Returns the trigger source (e.g. api)

Returns the trigger source (e.g. `api`)
raw docstring

successclj

Job result that indicates the job was successful

Job result that indicates the job was successful
raw docstring

tagclj

Gets commit tag (if any) from the context.

Gets commit tag (if any) from the context.
raw docstring

touched?clj

Checks if files have been touched in this build using the given predicate, which can either be a regex, a string or a matcher function. Similar to added?.

Checks if files have been touched in this build using the given predicate, which can either be a
regex, a string or a matcher function.  Similar to `added?`.
raw docstring

unblockedclj

(unblocked job)

Unmarks a previously blocked job as unblocked. Note that this has no effect if the job lifecycle status is already blocked, it only affects the job blocked status before the script is started.

Unmarks a previously blocked job as unblocked.  Note that this has no effect if the
job lifecycle status is already blocked, it only affects the job `blocked` status 
before the script is started.
raw docstring

with-messageclj

Sets a human-readable message on the return value

Sets a human-readable message on the return value
raw docstring

work-dirclj

(work-dir job)
(work-dir job wd)

Gets or sets work dir for the job

Gets or sets work dir for the job
raw 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