« Previous | Next » 

Revision e5398c3a

IDe5398c3afde43e9165e96ab5cc8e0426519ad8ad
Parent 2ca1b52d
Child d7c461b6

Added by Petr Pudlak over 7 years ago

Add patching QA configuration files on buildbots

In order to work, it is necessary:
  • Write a JSON Patch to file "qa/qa-patch.json" in a source repository.
    (And be careful not to commit it!) The file must conform to RFC6902
    and describes what changes should be done to the QA JSON
    configuration. This is simple as
    [ { "op": "add",
    "path": "default",
    "value": false }, { "op": "add",
    "path": "/tests/instance-add-file",
    "value": true }
    ]
  • Install "jsonpatch" and "jsonpointer" modules on the machines QA is
    running on. Either using "easy_install" or as Debian packages using
    "pypi-install".

QA only loads the modules if the patch file is present and non-empty.
Therefore no changes to buildbots are needed, if the feature is not
used.

It's advisable to add a git pre-commit hook for the main repository to
prevent changes to "qa/patch.json", keeping it to "[]". Suggestion for
such a hook:

  1. Exit code 1 if the patch file isn't just "[]":
    python -c 'import json, sys; \
    exit(0 if json.load(open("qa/qa-patch.json", "r")) == [] else 1)'

Locally it's possible to tell git not to track changes to the file at
all (see https://help.github.com/articles/ignoring-files):

git update-index --assume-unchanged qa/qa-patch.json

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences