pinkywafer / Home-Assistant_Config

91 stars 15 forks source link

Trigger new Travis build on new HA version available #21

Closed pinkywafer closed 3 years ago

pinkywafer commented 3 years ago

Travis builds are normally triggered by commits/pr to the repo. When a new Home Assistant version becomes available, trigger a Travis build against the new version of home Assistant. This will validate config automatically before the new version is installed.

pinkywafer commented 3 years ago

Trigger build using Travis rest API: https://docs.travis-ci.com/user/triggering-builds/

pinkywafer commented 3 years ago
pinkywafer commented 3 years ago

rest command to trigger build:

rest_command:
  travis_build:
    url: https://api.travis-ci.org/repo/pinkywafer%2FHome-Assistant_Config/requests
    method: POST
    headers:
      authorization: !secret travis_api_key
      Content-Type: "application/json"
      Accept: "application/json"
      Travis-API-Version: 3
    payload: '{"request": {"branch":"master"}}'
CCOSTAN commented 3 years ago

This will be pretty neat if you can Test the new build of HA against your COnfig and then drop a PASS/FAIL comment on the ISSUE that tracks the new HA upgrade task.

pinkywafer commented 3 years ago

@CCOSTAN working!! Note that if you do this, the secret for Travis API has to be "token YourApiKey" and the github issue api key also has to have token before the api key... took me ages to figure that out!!