Build server setup documentation

Here is the webhook we’re using to build all four Bus Pirate firmwares, package them and post them to this Discourse forum.

webhook.zip (3.8 KB)

python webhook --test

Optional test argument forces it to run a task instead of starting the webhook listener

  • A task is one repo branch
  • Tasks have 1 or more builds that compile firmware and produce one or more outputs
  • Builds have one or more make commands, and support %%GIT_COMMIT_HASH%% as a tag that is replaced by the current git short hash
  • Outputs have an optional zip_file_location property that shoves the _rev8 firmware into a folder called attic
  • Outputs are packaged with log files, and then posted to a discourse thread
  • API username, key and URL should be stored in a .env file (see sample.env)
  • If the git_pull_dir directory doesn’t exist, the script will attempt to clone and switch to the git_branch specified. This is so adding new branches is faster/automated.

It also has the dead simple class that posts new pull requests in the forum.

1 Like