bios.sh

BIOS looks for a bios.sh script in your repo. If no script is present no commit status is set.

Exit code

The exit code of bios.sh controls the GitHub commit status. If the script exits 0 it will set a succcess status, and if it exits non-zero it will set a failure status.

stdout / stderr

The stdout and stderr output of bios.sh is captured and posted as a GitHub commit comment.

As a rule of thumb, turn on command traces with set -x to print every command that runs onto stderr. This helps your team understand script failures and software to prettify the commit comment.

STAT and FAIL lines

Output lines that start with STAT: or FAIL: will set a new pending status. This helps you see progress as the script runs.

echo"STAT: Cloning"
git clone $URL||{echo"FAIL: Cloning"; exit1; }

Note: FAIL: lines are highligted in the commit comment but do not cause a failed commit status. That is controlled by the exit code.

run utility

The execution environment includes a run command. Prefix every important or long-running command with run -s <step> to automatically add STAT: and FAIL: lines along with other human and machine friendly decoration.

BREF / BSHA

BSHA is a SHA of the base of pull request, e.g. cfce341d2beb70c41e326cf51faee09e3ca393b4.

This enables looking at a diff with git clone diff $BSHA $SHA.

URL

URL is the repo clone URL, e.g. https://github.com/nzoschke/run.git.

GOPATH / HOME / PATH / TMP

BIOS executes in a Lambda function. System environment variables are automatically set to reflect the Lambda sandbox and temporary work directory.

Custom environment

You can set custom environment variables through the BIOS dashboard. This allows you to define additional environment variables when bios.sh runs. For example, you can add a personal GitHub API key with additional permissions, say to automate creating a GitHub release.

Authorization

The BIOS dashboard is a web app that you authorize for single sign on with your GitHub account, and to perform actions within the scope of the BIOS GitHub App. The dashboard can not do anything the app can not do.