aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPhilipp Geyer2024-06-17 21:14:58 +0200
committerPhilipp Geyer2024-06-17 21:14:58 +0200
commit7f4ce2b2ca4ad41d04789a9877f197b6ebfaded9 (patch)
tree29f5baf7944a57f2536f6e97565eb389b179ee8a /README.md
downloadsimpleci-7f4ce2b2ca4ad41d04789a9877f197b6ebfaded9.tar.gz
simpleci-7f4ce2b2ca4ad41d04789a9877f197b6ebfaded9.tar.bz2
simpleci-7f4ce2b2ca4ad41d04789a9877f197b6ebfaded9.zip
First commit of simpleci
Diffstat (limited to 'README.md')
-rw-r--r--README.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f80bd35
--- /dev/null
+++ b/README.md
@@ -0,0 +1,55 @@
+# Simple CI
+
+The simplest pseudo-Continuous Integration tool I could conceive
+
+This does not have a web UI
+This does not have error reporting
+This does not require docker
+
+This is just a script which is intended to be run by cron, or some
+other mechanism, and it will just check a git repository, update if
+there's a change, and then run a command within this directory.
+
+This can be a deployment command (making this a CD, not CI) or it can
+be kicking off a test suite, or it can be whatever you want.
+
+## The reason
+I have a small VPS, I wanted it to deploy a static site when I pushed
+a change to a live branch. I could have used a post-receive hook on
+the server, but the repository is currently within a docker container,
+something I intend to change at some point. I am sure I could change
+it, but I just wanted a solution. I couldn't find anything that just
+did the bare minimum I wanted without bells and whistles, so I wrote
+one.
+
+## Configuration
+Within simpleci.sh there are two variables:
+* `JOB_DIR` - sets the location for jobs
+* `WORKSPACE_DIR` - sets the location that simpleci will use for local
+ copies
+
+These default to being 'jobs' and 'workspaces' within the simpleci
+directory, but can be changed.
+
+## Jobs
+Jobs are names of projects which can be run. These are stored within
+`JOB_DIR`. These are a simple file with up to three pieces of
+information:
+* `REPO` - the repository to monitor
+* `BRANCH` - the branch to monitor [live]
+* `COMMAND` - the command to run within the directory [make publish]
+
+## Running
+It is possible to run simpleci manually
+`/path/to/simpleci.sh` - this will check for any updates in any of the
+jobs, and run them where required
+`/path/to/simpleci.sh JOB1 [JOB1 [JOB3 ..]].` - this will force-run
+specific jobs, regardless if there is an update or not.
+
+The job names are the filenames within `JOB_DIR`.
+eg
+`/path/to/simpleci.sh example`
+
+It is also possible to add to cron to run it periodically.
+eg
+`*/30 * * * * /path/to/simpleci.sh >> /path/to/simpleci.log 2>&1`