1

I want to automate the build of a Chocolatey package every time an author creates a new GitHub release. The specific example I am talking about is the HIBPOfflineCheck plugin for KeyPass2, but it could in practice be any software that is hosted on GitHub and uses the Release feature.

The flow I am looking to implement looks something like this:

       [ author of the package commits changes to GitHub ]

                            |
                            V

  [ author creates a new release, could be manual or automated ]

                            |
                            V

              [ my CI build is triggered ]

                            |
                            V

        [ publish the new chocolaty package to chocolaty ]

Conceivably I could create a pull request against the original repository. However, that has some issues:

  1. It requires the original author to take over responsibility for maintaining a chocolatey package; they may have no interest in managing.
  2. Their CI system may be incapable of generating and publishing the package.
  3. They may not have the knowledge required to configure Chocolatey API keys etc.

Triggering CI based upon a new GitHub release is possible in Concourse CI, so it's not an original thought. However, Concourse is not a SaaS product.

  • Obviously if the upstream author adds a git webhook for a release event to trigger your ci its easy. So I assume that you dont expect them to add a webhook for you. In which case there isn’t any mechanism other than writing a job that hits the well known GitHub api for the latest release. If the hash of the response at the url changes you should do a new build. – simbo1905 Mar 22 at 23:47
  • Yes, this was assuming that the other party did not get involved at all. – Richard Slater Mar 25 at 10:23
  • well unless someone knows a free service that polls github repos for changed to the hash of the json at the api endpoint for the latest release to then trigger your build Webhook you are going to have to write that yourself which would be a half dozen lines of bash calling curl else easy in python etc – simbo1905 Mar 25 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.