-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the clevertools wiki!
clevertools is a public github project!!
clevertools is a set of helper scripts that (hopefully!) helps you build and deploy your projects!!
- encourage many small builds/deploys (vs few large builds/deploys)
- make it as painless and hassle-free as possible to do builds/deploys
- building and deploying should be fearless and unremarkable
linux and mac:
sudo pip install https://github.com/CleverPet/clevertools/archive/master.zip
- helper scripts to help you build and deploy your projects (whatever that means!)
- a monotonically increasing cleverbuild number (CLEVERBUILD_NUMBER environment variable, increases on successful builds), persisted in the target git project as a git tag, e.g., "cleverbuild-5"
- a single per-project non-idempotent ".cleverbuild" script (optional) that results in new git tags to help you build (and manage) your project
- multiple per-project idempotent ".cleverscript" scripts (optional) that do "interesting things" to help you deploy (and manage) your projects
- .cleverbuild scripts act as documentation on how to build your projects
- .cleverscript scripts act as documentation on how to deploy your projects
there are two (2) main clevertools actions/concepts:
- clevertag (runs .cleverbuild script)
- cleverrun (runs .cleverscript scripts)
/usr/bin/clevertag:
- runs the project's .cleverbuild script in a isolated sandbox, with the next optomistic monotonically increasing cleverbuild number, to try to build a new build and
- if success then tags git repo with the cleverbuild number
/usr/bin/cleverrun:
- runs a project .cleverscript script in a isolated sandbox against existing cleverbuild tag and
- there is no 2
running clevertag creates a new git tag; running cleverscripts do not
there is only one (1) .cleverbuild script; there may be zero or more .cleverscripts (as many as u need to do whatever u need that makes sense for your project)
be conservative when running clevertag (because it creates new git tags); be liberal when running .cleverscript scripts (because they do not create new git tags)
clevertools scripts should be "fail fast", e.g., for bash scripts use
#!/bin/sh -e
-e means "fail fast"
better yet, use -ex, e.g.,
#!/bin/sh -ex
-x means print commands as they are run
things I didn't like (never liked) about building software w/jenkins
- jenkins kept track of "failed" builds (and incremented build number on failed builds too).. this is understandable on jenkins part as jenkins is primarily a unit test runner and u do want to keep track of failed unit tests
- because jenkins kept track of build number then that meant that the jenkins install was "sacred", i.e., that it needed to be managed in case of disaster (e.g., backup/restore)
- branches, e.g., "cleverbuild hotfix1"
self hosted clevertools, i.e., clevertools uses clevertoolsautomatically create rough draft release notes?-
if cleverbuild and no diff then run cleverscript?bad idea - cleverbuild/script assumes "origin".. needs fixing?
- prune /tmp folders
- don't run "git fetch" ?!?
cleverscript --cleverbuild_number zzz