Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Makefile for pushing configuration to buildbot instance

  • Loading branch information...
commit e6739b5fdf35f923ecca8aa451cec2925cb8eacf 1 parent ab8f12d
@jonnor authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 Makefile
View
20 Makefile
@@ -0,0 +1,20 @@
+# -*- makefile -*-
+
+SSH_NAME = deploymentkit-buildbot
+GIT_NAME = buildbot
+BUILDBOT_DIR = ./buildbot
+
+remote_cmd = ssh $(SSH_NAME)
+target_branch = master
+
+push-config:
+ # Push the changes
+ @$(remote_cmd) "cd $(BUILDBOT_DIR) && git checkout HEAD^"
+ @git push -f $(GIT_NAME) HEAD:$(target_branch)
+ @$(remote_cmd) "cd $(BUILDBOT_DIR) && git checkout $(target_branch)"
+
+ # Check and restart the buildbot
+ @$(remote_cmd) "cd $(BUILDBOT_DIR) && buildbot checkconfig && buildbot restart"
+
+ # Sanity check
+ @git diff-index --quiet HEAD || echo 'Warning: Uncommitted changes present'
Please sign in to comment.
Something went wrong with that request. Please try again.