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.
(download-artifact req)
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-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
(start-server {:keys [port] :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.
(upload-artifact req)
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