This repository was archived by the owner on Jun 15, 2024. It is now read-only.
-
Couldn't load subscription status.
- Fork 59
Build Metadata
Florian Sellmayr edited this page Feb 5, 2017
·
6 revisions
introduced in version 0.13.0
Build Steps can retrieve and change build metadata by accessing the atom :build-metadata-atom in ctx. Changes to this atom are automatically persisted and available throughout the build. This can be used to manage state that should be shown to the user in the UI or to manage state for higher level APIs.
(defn build-step-setting-build-label [args ctx]
(support/assoc-metadata! ctx :human-readable-build-label "some-build-label")
{:status :success})
(defn build-step-setting-build-label-without-helper-functions [args ctx]
(swap! (:build-metadata-atom ctx) #(assoc % :human-readable-build-label "some-build-label"))
{:status :success})Build Metadata is a map of mostly arbitrary values. However, some have special meaning for LambdaCD or a supporting library:
-
:human-readable-build-labelcan be displayed instead of the build-number in the UI
-
lambdacd.steps.support/assoc-metadata!is a shorthand that simplifies anassocon the build-metadata