This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
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-build-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-label
can be displayed instead of the build-number in the UI
-
lambdacd.steps.support/assoc-metadata!
is a shorthand that simplifies anassoc
on the build-metadata