Skip to content

atomjuice/build-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helper tasks for projects

Development

Launch bb and connect to the nrepl server from your IDE.

bb --nrepl-server

Usage

make sure bb tool is available on your PATH, create bb.edn in the project your interested in like below. Copy the tasks you actually need for the project.

{:paths ["src"]
 :deps {atomjuice/build-tools {:git/url "[email protected]:atomjuice/build-tools.git"
                               :git/sha "1217cce7032d65394105f11b7ed9216bcbdf86d3"}}
 :tasks
 {hooks {:doc "Hook related commands"
         :requires ([build-tools.git-hooks :as gh])
         :task (apply gh/hooks *command-line-args*)}

  fetch-artifact-images
  {:doc "Fetch project images"
   :requires ([gcp.clean-artifact-registry :as ar])
   :task (apply ar/list-artifact-images *command-line-args*)}}}

GCP cron jobs

The cronjob task will read in a cronjobs.edn file with details on how to deploy for a specific deployment.

invoking

This will list the installed task in bb.edn

bb tasks

Example cleaning gcp artifact registry

bb fetch-artifact-images clean --image europe-docker.pkg.dev/atomjuice-staging/applications/merchant-api

Google cloud Build

Using this with cloud build is a bit more complicated as we need gcloud java and bb available, there is a docker file to facilitate this.

Building images for prod and stage projects with these commands

docker build -f Dockerfile-gcloud -t europe-docker.pkg.dev/atomjuice-production/tools/babashka .
docker build -f Dockerfile-gcloud -t europe-docker.pkg.dev/atomjuice-staging/tools/babashka .

Push to gcp with these commands.

docker push europe-docker.pkg.dev/atomjuice-production/tools/babashka
docker push europe-docker.pkg.dev/atomjuice-staging/tools/babashka

CI

There is a github action here https://github.com/marketplace/actions/babashka-clojure

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published