From a discussion with @thcipriani:
Automating the deployment of backports with scap swat
- patches use the hashtag field in gerrit to specify a swat window using the convention swat-yyyy-mm-dd-WINDOW ex. swat-2019-06-26-evening
- scap swat command finds patches for the current window and allows deployer to select 1 or more patches
- patches get cherry picked, merged and pulled as necessary
- In some situations this might involve some manual parts but should be mostly automated
- patch gets deployed to debug host with scap pull
- prompt the deployer to test and confirm
- once confirmed we can automatically run scap sync-file on the affected files/directories
Along with all of this automation, we want to capture some metrics in logstash for future analysis. Specifically:
- log the start of deployment with details:
- deployer username
- number of patches selected
- change ids of all patches
- "Patches merged and pulled"
- log result of manual testing on debug host
- log end of deployment checkpoint