Integrating into CI/CD

While it’s easy to start using Functions straight from web dashboard, it’s a good practice to keep the source in source control management (SCM), also known as version control systems such as:

Bitbucket pipelines

Bitbucket function example can be found here:

Updates are done using Bitbucket pipelines and the official Webhook Relay pipe which deploys your code.


  1. Create a new function here (or using relay CLI)

  2. Get your access token key & secret

  3. Configure Bitbucket repository settings with access token:

    • Go to “Repository settings”
    • Click on “Repository variables” (if pipelines are not enabled, enable them)
    • Add two environment variables RELAY_KEY (with value from the access token ‘key’) and RELAY_SECRET (with value from the access token ‘secret’)

    setting bitbucket variables

  4. Create bitbucket-pipelines.yml file in your repository root directory:

    image: golang:1.12
       - step:
             - pipe: webhookrelay/webhookrelay-function-deploy:0.2.4
                 FUNCTION_NAME: 'name of your functions' # Replace with your function name
                 FUNCTION_FILE: 'function_file_name.lua' # Replace with your function filename 
                 RELAY_KEY: $RELAY_KEY
                 RELAY_SECRET: $RELAY_SECRET

That’s it, you can now push your functions and get them updated:

bitbucket pipeline view