This is a library that's meant as a plugin for MonkeyCI builds.
After creating an account on MonkeyCI, just include
the dependency in your .monkeyci/deps.edn
:
{:deps {com.monkeyci/plugin-clj {:mvn-version "LATEST"}}}
It allows you to set up builds for Clojure projects with minimal code.
A library is something that you want to deploy. Either as a snapshot when you push to
the main
branch, or when you push a tag, in which case the tag name will be used as
the release version. You could optionally specify a regex that is applied to the tag
name. If the regex does not match, it is not considered to be a deployment.
In order to use it in your build script, just use the library
pipeline, like in this
example build script:
(require '[monkey.ci.plugin.clj :as p])
(p/library {:tag-regex p/version-regex})
This is almost the most basic configuration. You could also leave out the entire
config map, if you want! The version-regex
matches any standard version tag
(that looks like x.x.x
or x.x
).
It will run the unit tests, that are assumed to be declared as an alias function named
:test
in deps.edn
(as a default). It reads all necessary information to deploy
the library from the committed pom.xml
. These values can be overridden using config
parameters.
These are the options you can use to configure the library build:
|Option|Default|Description|
|---|---|---|
|:tag-regex
|#".*"
|Regex to filter release tags|
|:clj-img
|docker.io/clojure:...
|The image to use to test and publish. Tag depends on lein or cli library and evolves with the lib version. See monkey.ci.plugin.clj/default-deps-img
.|
|:test-alias
|:test:junit
|The alias to apply when building a library that uses deps.edn
|
|:publish-alias
|:jar:publish
|The alias to apply when publishing the library|
|:pom-file
|pom.xml
|The location of the pom file, relative to the checkout dir.|
|:version-var
|LIB_VERSION
|When publishing, the version will be stored in this env var.|
Since this is Clojure, you can of course pick the parts you like. The library
function just
returns a pipeline, to which you can add more steps, or you can include it in a larger pipeline
list. Or you can call the functions that have been provided to create the individual steps.
See the source for this.
Copyright (c) 2024 by Monkey Projects. MIT License.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close