Webhook Relay
PricingLogin
  • Introduction
  • Quick Start - Forwarding
  • Quick Start - Tunnels
  • 🛠️Installation
    • Relay CLI
      • Install
      • Auto-start
      • Run config.yaml reference
    • Containerized
      • Kubernetes Installation
      • Podman
      • Docker
      • Docker Compose
  • Products
    • 🛰️Webhook Forwarding
      • Glossary
      • WebSocket Server
      • Authentication
      • Custom Domains
    • ⚡Functions
      • Managing functions
      • Edit request/response
      • Working with JSON
      • 🦾Advanced
        • Working with time
        • Testing functions in CLI
        • Making HTTP Requests
        • Multipart Form Data
        • URLEncoded Form Data
        • GCP BigQuery
        • Sending Emails
        • JWT authentication
        • Base64, Hashes, Encryption
      • 🤖Integrating into CI/CD
    • 🔃Tunnels
      • Using tunnels
      • Custom Domains
      • Encryption (HTTPS)
      • Regions
  • 📝Examples
    • Intro to examples
    • Webhooks
      • Receiving webhooks on localhost
      • Receive webhooks inside your JavaScript app
      • Execute shell scripts on remote machines
    • Functions
      • Enrich webhooks from 3rd party APIs
      • Convert DockerHub webhook to Slack notification
      • Allowing only POST requests through
      • Manipulate webhook request body
    • Tunnels
      • Ingress for any Kubernetes environment
      • Demoing your website
    • 🏠Home Automation
      • Home Assistant
      • Node-RED
      • Raspberry Pi
  • Platform
    • CLI Basics
    • Using CLI Behind Proxy
    • Self-hosting Server
      • Server deployment
      • Client configuration
    • Security & Tech
Powered by GitBook
On this page
  • Bitbucket pipelines
  • Setup

Was this helpful?

  1. Products
  2. Functions

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.

PreviousBase64, Hashes, EncryptionNextTunnels

Last updated 3 years ago

Was this helpful?

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 systems such as:

Bitbucket pipelines

Bitbucket function example can be found here: .

Updates are done using and the official which deploys your code.

Setup

  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’)

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

image: golang:1.12
pipelines:
 default:
   - step:
       script:
         - pipe: webhookrelay/webhookrelay-function-deploy:0.2.4
           variables:
             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
⚡
🤖
version control
Github
Bitbucket
Gitlab
https://bitbucket.org/rusenas/webhookrelay-function-example/src/master/
Bitbucket pipelines
Webhook Relay pipe
https://my.webhookrelay.com/functions
https://my.webhookrelay.com/tokens