CI with bitbucket and pipelines

Just added all my code to bitbucket and was setting up a test to check the config and verify it and then was hopefully going to somehow automatically pull and reboot hass on my pi if the test was successful.

The problem I’m running into is that pipelines ‘builds’ everything ok, except this line hass -c . --script check_config.
That line executes but even if the output contains config errors, the build still passes.
This was my most recent (purposefully trying to fail to make sure it works) test result
> + hass -c . --script check_config

INFO:homeassistant.util.package:Attempting install of colorlog>2.1,<3
Testing configuration at /opt/atlassian/pipelines/agent/build/.
2017-05-13 12:24:31 ERROR (Thread-1) [homeassistant.util.yaml] while parsing a block mapping
  in "/opt/atlassian/pipelines/agent/build/./sensor.yaml", line 1, column 5
expected <block end>, but found '<block sequence start>'
  in "/opt/atlassian/pipelines/agent/build/./sensor.yaml", line 8, column 6
2017-05-13 12:24:31 ERROR (MainThread) [homeassistant.bootstrap] Error loading ././configuration.yaml: while parsing a block mapping
  in "/opt/atlassian/pipelines/agent/build/./sensor.yaml", line 1, column 5
expected <block end>, but found '<block sequence start>'
  in "/opt/atlassian/pipelines/agent/build/./sensor.yaml", line 8, column 6

But the pipelines result was still success. Does anyone know of a way to trigger a build failure if any of the output contains the word Error or something? Also any links of ideas on how to set up my pi to auto pull and reboot if the build was successfull ?

@spacesubmarine

I have a similar setup in Travis-CI & GitHub. However, I don’t know how to tell either Travis-CI or BitBucket Pipelines to restart a build automatically. My Travis-CI setup (docs are linked above) automatically triggers at each new commit or pull request. Emails are also sent when a build fails and the next build that fixes a failed build.

If that doesn’t help you out please post a link to your Pipelines setup as I’d love to check it out! It’s been a while since I used Pipelines since it was pretty basic when I was first testing it out, however, I’ll dive back in, especially because BitBucket’s new UI is great!

Heres my repo ( I think I linked it right). Right now I have pipelines running the test and then ssh-ing into my pi, pulling and rebooting, not very elegant. But the hass -c . --script check_config still ‘passes’ when theres errors. So still messing around with that

And yea the new UI is awesome