Intro
A BigConfig Package ( announcement ) is a standard Clojure project. The core logic of a package is a function authored via the BigConfig Workflow .
Babashka
Section titled “Babashka”Your package is a dependency within your bb.edn and it is mapped to a Babashka task.
1. Register the Task: Add the package to your :deps and define the task in bb.edn:
{:deps {io.github.amiorin/alice {:git/sha "9c214edce47419297e6bd8212a63bb0ab93bcf86"}} :tasks {:requires ([io.github.amiorin.alice.package :as package]) alice {:doc "bb alice create" :task (package/alice* *command-line-args*)}}}2. Execute via CLI: Standardize your lifecycle commands. Note that we use create rather than install to reflect that infrastructure is being actively provisioned as part of the delivery.
# Provision the infrastructure and softwarebb alice create
# Tear down the resourcesbb alice deleteNote: Because BigConfig leverages Babashka, startup times are near-instant, making it ideal for CI/CD pipelines and developer inner-loops alike.
Development
Section titled “Development”Clone the repo and change the dependency from remote to local. The bb.edn of the repo is also a good start.
{:deps {io.github.amiorin/alice {:local/root "../path/to/cloned/repo"} :tasks {:requires ([io.github.amiorin.alice.package :as package]) alice {:doc "bb alice create" :task (package/alice* *command-line-args*)}}}Available Steps
Section titled “Available Steps”Main steps
Section titled “Main steps”| Step | Description |
|---|---|
| create | Create the delivery |
| delete | Delete the delivery |
Coordination steps
Section titled “Coordination steps”You can use these client side steps to achieve the same thing you have with Atlantis for Terraform.
| Step | Description |
|---|---|
| git-check | Verifies the working directory is clean and synced with origin. |
| git-push | Pushes local commits to the remote repository. |
| lock | Acquires an execution lock. |
| unlock-any | Force-releases the lock, regardless of the current owner. |
Options
Section titled “Options”The user can pass his options to the package
{:deps {io.github.amiorin/alice {:git/sha "9c214edce47419297e6bd8212a63bb0ab93bcf86"}} :tasks {:requires ([io.github.amiorin.alice.package :as package]) alice {:doc "bb alice create" :task (package/alice* *command-line-args* {:big-config.render/profile "prod"})}}}Note: bb.edn doesn’t support the
::notation like Clojure files.
Advanced cases
Section titled “Advanced cases”If you need to override the step-fns or generate options dynamically, you
can override the <workflow>* function itself.
(ns io.github.new-user.alice.package (:require [big-config :as bc] [big-config.render :as render] [big-config.workflow :as workflow] [io.github.amiorin.alice.package :as p]))
(defn alice* [args & [opts]] (let [profile "default" step-fns [(fn [f step opts] (f step opts))] opts (merge (workflow/parse-args args) {::bc/env :shell ::render/profile profile ::workflow/prefix (format ".dist/%s" profile)} opts)] (p/alice step-fns opts))){:deps {io.github.new-user.alice {:local/root "."}} :tasks {:requires ([io.github.new-user.alice.package :as package]) ;; Provision my version of Alice alice (package/alice* *command-line-args*)}}