Add a land bot script for running smoke tests before landing patches
Summary:
This patch provides a way for the CI to make sure a given patch is
rebased on master, smoke tested, and still landed as the submitter as one
would normally expect from a landing workflow.
The land workflow, once complete, will be roughly this:
- User runs arc land
- A custom ABC Arcanist workflow intercepts the land command and diverts it to abc-land workflow rather than the default. The default workflow will still be available under another name, if needed.
- The abc-land workflow sends the REVISION and encrypted CONDUIT_TOKEN to abcbot.
- abcbot queues the build.
- The build decrypts CONDUIT_TOKEN and runs land-patch.sh
Some parts are obviously missing, but these will come later:
- Applying autogen onto a patch in-flight, such as updating manpages
- Being able to land unreviewed diffs (reserved for automated commits such as updating chainparams).
Regarding the CONDUIT_TOKEN, note that the script needs it unencrypted in order to land the patch
as you. This is safe to run locally. For the complete land-bot pipeline, your Conduit token will
be encrypted before passing along via arc land. This prevents the token from accidentally
getting logged while your request is on its journey through abcbot and the patch queue. It will only
be unencrypted once the land-bot begins working on your patch, immediately before calling this script.
While this infra is being worked on, feel free to run this script directly and provide additional feedback.
Test Plan:
./land-patch.sh -h ./land-patch.sh # errors as expected ./land-patch.sh -r D5780 # errors as expected CONDUIT_TOKEN=<token> ./land-patch.sh -r D5780 --dry-run CONDUIT_TOKEN=<token> ./land-patch.sh -r D5780 # was used to land https://reviews.bitcoinabc.org/D5780
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5801