diff mbox

[RFC] .travis.yml: Disable IRC build status updates from non-master branches

Message ID 20160627165137.18252-1-bobby.prani@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pranith Kumar June 27, 2016, 4:51 p.m. UTC
Currently travis logs all builds from forks to the qemu IRC
channel. There is no way to disable such updates in travis at present
(see https://github.com/travis-ci/travis-ci/issues/1094). Until such
feature is available, let us at-least limit the IRC update to the
master branch.

Another alternative is to encrypt the "qemu/qemu" repository so that
only the main repository updates are posted on
IRC. (ref. https://github.com/facebook/flow/pull/1822).

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 .travis.yml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Peter Maydell June 27, 2016, 5:16 p.m. UTC | #1
On 27 June 2016 at 17:51, Pranith Kumar <bobby.prani@gmail.com> wrote:
> Currently travis logs all builds from forks to the qemu IRC
> channel. There is no way to disable such updates in travis at present
> (see https://github.com/travis-ci/travis-ci/issues/1094). Until such
> feature is available, let us at-least limit the IRC update to the
> master branch.
>
> Another alternative is to encrypt the "qemu/qemu" repository so that
> only the main repository updates are posted on
> IRC. (ref. https://github.com/facebook/flow/pull/1822).
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  .travis.yml | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/.travis.yml b/.travis.yml
> index c13881e..f0ca3a1 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -34,12 +34,16 @@ addons:
>        - sparse
>        - uuid-dev
>
> +branches:
> +  only:
> +    - master

Does this mean "only main qemu repo master does notifications",
or just "only the 'master' branch for any qemu repo does
notifications" ?

thanks
-- PMM
Pranith Kumar June 27, 2016, 5:18 p.m. UTC | #2
On Mon, Jun 27, 2016 at 1:16 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> +branches:
>> +  only:
>> +    - master
>
> Does this mean "only main qemu repo master does notifications",
> or just "only the 'master' branch for any qemu repo does
> notifications" ?
>

This does the later. If we prefer the former, we need to encrypt the
IRC channel as suggested in:
https://github.com/facebook/flow/pull/1822
Peter Maydell June 27, 2016, 5:28 p.m. UTC | #3
On 27 June 2016 at 18:18, Pranith Kumar <bobby.prani@gmail.com> wrote:
> On Mon, Jun 27, 2016 at 1:16 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>>
>>> +branches:
>>> +  only:
>>> +    - master
>>
>> Does this mean "only main qemu repo master does notifications",
>> or just "only the 'master' branch for any qemu repo does
>> notifications" ?
>>
>
> This does the later. If we prefer the former, we need to encrypt the
> IRC channel as suggested in:
> https://github.com/facebook/flow/pull/1822

I think we want the former, but I can't figure out what that
link is suggesting actually needs to be done.

thanks
-- PMM
Pranith Kumar June 27, 2016, 5:34 p.m. UTC | #4
On Mon, Jun 27, 2016 at 1:28 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 27 June 2016 at 18:18, Pranith Kumar <bobby.prani@gmail.com> wrote:
>> On Mon, Jun 27, 2016 at 1:16 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>>>
>>>> +branches:
>>>> +  only:
>>>> +    - master
>>>
>>> Does this mean "only main qemu repo master does notifications",
>>> or just "only the 'master' branch for any qemu repo does
>>> notifications" ?
>>>
>>
>> This does the later. If we prefer the former, we need to encrypt the
>> IRC channel as suggested in:
>> https://github.com/facebook/flow/pull/1822
>
> I think we want the former, but I can't figure out what that
> link is suggesting actually needs to be done.
>

The idea is to encrypt "irc.oftc.net#qemu" against "qemu/qemu" to
generate an ecrypted string like follows:

$ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"

This creates a value which will be properly decrypted only for commits
to branches on "qemu/qemu" repository and will be garbage for other
forked repositories. So the travis bot will only log the desired
notifications.

I will send in a patch which does this.

Thanks,
Peter Maydell June 27, 2016, 5:40 p.m. UTC | #5
On 27 June 2016 at 18:34, Pranith Kumar <bobby.prani@gmail.com> wrote:
> The idea is to encrypt "irc.oftc.net#qemu" against "qemu/qemu" to
> generate an ecrypted string like follows:
>
> $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
>
> This creates a value which will be properly decrypted only for commits
> to branches on "qemu/qemu" repository and will be garbage for other
> forked repositories. So the travis bot will only log the desired
> notifications.

OK, but why does it need to be an encrypted string? Doesn't
travis just have a way to say "only for this repo"?

thanks
-- PMM
Pranith Kumar June 27, 2016, 5:47 p.m. UTC | #6
On Mon, Jun 27, 2016 at 1:40 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 27 June 2016 at 18:34, Pranith Kumar <bobby.prani@gmail.com> wrote:
>> The idea is to encrypt "irc.oftc.net#qemu" against "qemu/qemu" to
>> generate an ecrypted string like follows:
>>
>> $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
>>
>> This creates a value which will be properly decrypted only for commits
>> to branches on "qemu/qemu" repository and will be garbage for other
>> forked repositories. So the travis bot will only log the desired
>> notifications.
>
> OK, but why does it need to be an encrypted string? Doesn't
> travis just have a way to say "only for this repo"?

Sadly there is no such way right now. They are working on adding such
a feature. We can use that once it is available.
diff mbox

Patch

diff --git a/.travis.yml b/.travis.yml
index c13881e..f0ca3a1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,12 +34,16 @@  addons:
       - sparse
       - uuid-dev
 
+branches:
+  only:
+    - master
 notifications:
   irc:
     channels:
       - "irc.oftc.net#qemu"
     on_success: change
     on_failure: always
+
 env:
   global:
     - TEST_CMD="make check"