Functions for setting up a build script API. The build runner starts its own API server, which is only accessible by the build script and any containers it starts. This is for security reasons, since the build script is untrusted code. Restricting access to the API server is done on infra level, by setting up network security rules. Piping all traffic through the build runner also ensures that the global API will not be overloaded by malfunctioning (or misbehaving) builds.
Functions for setting up a build script API. The build runner starts its own API server, which is only accessible by the build script and any containers it starts. This is for security reasons, since the build script is untrusted code. Restricting access to the API server is done on infra level, by setting up network security rules. Piping all traffic through the build runner also ensures that the global API will not be overloaded by malfunctioning (or misbehaving) builds.
Downloads an artifact. The body contains the artifact as a stream.
Downloads an artifact. The body contains the artifact as a stream.
(generate-token)
Generates a new API security token. This token can be set in the API server and should be passed on to the build script.
Generates a new API security token. This token can be set in the API server and should be passed on to the build script.
(get-all-ip-addresses)
Lists all non-loopback, non-virtual site local ip addresses
Lists all non-loopback, non-virtual site local ip addresses
(get-ip-addr)
Determines the ip address of this VM
Determines the ip address of this VM
Gets current build configuration from the request
Gets current build configuration from the request
(req->ctx req)
Gets the config map from the request
Gets the config map from the request
(rt->api-server-config rt)
Creates a config map for the api server from the given runtime
Creates a config map for the api server from the given runtime
(security-middleware handler token)
Middleware that checks if the authorization header matches the specified token
Middleware that checks if the authorization header matches the specified token
(srv->api-config {:keys [port] :as conf})
Creates a configuration object that can be passed to build runners, that includes the url
Creates a configuration object that can be passed to build runners, that includes the url
(start-server {:keys [port token] :or {port 0} :as conf})
Starts a build API server with a randomly generated token. Returns the server and token.
Starts a build API server with a randomly generated token. Returns the server and token.
Uploads a new artifact. The body should contain the file contents.
Uploads a new artifact. The body should contain the file contents.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close