Frage

I am using the new deployment fortrabbit.yml file to trigger post commit hooks. Before, the git webcall hooks (http://fortrabbit.com/docs/in-depth/git-hooks/webcall) provided me with information about the actual commit. How can I now (http://fortrabbit.com/docs/in-depth/deployment-file) access this information? I would like to know the commit ID (e.g. 40cede3910db6ba0140993ae0d33376ff5df7483). Thanks in advance!

War es hilfreich?

Lösung

The webcall hooks continue to exist in the new deployment fortrabbit.yml file. Simply use the post-deploy hook and set an url, like so:

post-deploy:


    # alternatively/additionally an URL can be specified which is called after
    #   deployment
    url: http://domain.tld/callback

    # token which will be send as request header `X-Frbit-Token` to verify that
    #   the request originated from this post-deploy call (defaults to "unset")
    token: your-own-token

In your callback, you receive the commit ID: http://fortrabbit.com/docs/in-depth/git-hooks/webcall#the-callback-url

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top