π€Integrating into CI/CD
In order to keep function code synchronized with what is deployed, we suggest updating function code directly from your source control system.
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: https://bitbucket.org/rusenas/webhookrelay-function-example/src/master/.
Updates are done using Bitbucket pipelines and the official Webhook Relay pipe which deploys your code.
Setup
Create a new function here https://my.webhookrelay.com/functions (or using
relay
CLI)Get your access token key & secret https://my.webhookrelay.com/tokens
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β)
4. Create bitbucket-pipelines.yml
file in your repository root directory:
Thatβs it, you can now push your functions and get them updated:
Last updated