Run the tests¶
Changing the examples¶
The batou configurations in the
examples/ directory use a custom GPG key.
To change the secrets files or to run the examples you have to set the
GNUPGHOME to point to
./src/batou/secrets/tests/fixture/gnupg. (But the path has to be absolute!)
$ cd examples/errors $ GNUPGHOME=/home/user1/clones/batou/src/batou/secrets/tests/fixture/gnupg ./batou deploy errors
Adding new migration steps¶
Migration steps are Python modules inside
The name of a new migration step must be an integer number (plus
.pyextension) bigger than any existing one. The already existing ones suggest that the first digit corresponds to batou’s major version and the second one to the minor version, so migration steps for batou 2.3 should be named
23xx.py. Not each possible number has to be used.
The highest migration version already applied to a batou project is stored in
./batou migrateruns all migration with a higher version number than the one stored in
.batou.jsonsteps in ascending order.
Each migration step has to provide a
migratefunction which takes one positional argument.
The migration steps’
migratefunction is called with a callable as argument which takes two arguments:
text. The values there given are rendered in the output to inform the user about changes done by the migration step or changes which have to be applied manually. This function can be called multiple times per migration step.