poule
poule copied to clipboard
Optimizing `rebuild` for the label-trigger scenario?
The rebuild
operation currently supports a single trigger label. If you want to configure multiple label to configuration associations, you need to repeat yourself in the configuration:
- repositories: [ "docker/docker" ]
triggers:
pull_request: [ labeled ]
operations:
- type: rebuild
settings: {
configurations: [ arm ],
label: "rebuild/arm",
}
- type: rebuild
settings: {
configurations: [ experimental ],
label: "rebuild/experimental",
}
Question: is that a good approach, or should rebuild
made aware of a label to configuration mapping?
Also, this would prevent the following torrent of logs:
time="2016-11-08T16:33:03-05:00" level=debug msg="received GitHub event" action=labeled event="pull_request" number=27745 repository="docker/docker"
time="2016-11-08T16:33:03-05:00" level=info msg="running operation" operation=rebuild repository="docker/docker"
time="2016-11-08T16:33:04-05:00" level=debug msg="rejecting pull request without label \"rebuild/arm\""
time="2016-11-08T16:33:04-05:00" level=info msg="running operation" operation=rebuild repository="docker/docker"
time="2016-11-08T16:33:04-05:00" level=debug msg="rejecting pull request without label \"rebuild/experimental\""
time="2016-11-08T16:33:04-05:00" level=info msg="running operation" operation=rebuild repository="docker/docker"
time="2016-11-08T16:33:04-05:00" level=debug msg="rejecting pull request without label \"rebuild/janky\""
time="2016-11-08T16:33:04-05:00" level=info msg="running operation" operation=rebuild repository="docker/docker"
time="2016-11-08T16:33:04-05:00" level=debug msg="rejecting pull request without label \"rebuild/userns\""
time="2016-11-08T16:33:04-05:00" level=info msg="running operation" operation=rebuild repository="docker/docker"
time="2016-11-08T16:33:04-05:00" level=debug msg="rejecting pull request without label \"rebuild/vendor\""
time="2016-11-08T16:33:04-05:00" level=info msg="running operation" operation=rebuild repository="docker/docker"
time="2016-11-08T16:33:04-05:00" level=debug msg="rejecting pull request without label \"rebuild/win2lin\""
time="2016-11-08T16:33:04-05:00" level=info msg="running operation" operation=rebuild repository="docker/docker"
time="2016-11-08T16:33:04-05:00" level=debug msg="rejecting pull request without label \"rebuild/windowsRS1\""