RAD Modules

RAD Modules

  • GitHub

›Serverless functions

Documentation

  • Getting started

Security

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Keycloak integration
  • Advanced configuration
  • Attribute-based access control

Mailer

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Notifications

  • Notifications service
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Scheduler

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

PDF

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Serverless functions

  • Details
  • Create file
  • Get files
  • Delete file
  • Resize images
  • Watermark
  • RAD Security integration
  • Bitbucket pipelines

Admin panel

  • Introduction

Services communication

  • Communication between services

Changelog

  • Details

Bitbucket pipelines

Configure Bitbucket Pipeline to deploy function

Environment variables

For each environment, we must define environment variables in deployment configuration.

Bitbucket -> Repository settings -> Deployments

And add new variables for AWS and STAGE:

  • AWS_LAMBDA_KEY
  • AWS_LAMBDA_SECRET
  • AWS_STAGE
  • your environments

environment variables

Pipeline YAML

You need add additional branches and custom configuration to bitbucket-pipelines.yml file

image: node:alpine
definitions:
  steps:
    - step: &compile
        name: Compile
        caches:
          - node
        script:
          - npm install
          - npm run lint
          - npm run tests
    - step: &deploy
        name: Deploy
        trigger: manual
        caches:
          - node
        script:
          - npm install
          - ./node_modules/.bin/serverless config credentials --stage ${AWS_STAGE} --provider aws --key ${AWS_LAMBDA_KEY} --secret ${AWS_LAMBDA_SECRET}
          - ./node_modules/.bin/serverless deploy --stage ${AWS_STAGE}

pipelines:
  default:
    - step: *compile
  custom:
    deploy-to-dev:
      - step: *compile
      - step:
          <<: *deploy
          deployment: dev
          name: Deploy to DEV

  branches:
    master:
      - step: *compile
      - step:
          <<: *deploy
          deployment: production
    develop:
      - step: *compile
      - step:
          <<: *deploy
          deployment: dev

For branches we defined two steps:

  • first step for build you app (*compile definition)
  • second step for deploy your app to AWS (*deploy definition, manually, start only if first step will be ok and also you must run it).

run manually

When you click run you see confirmation of deployment with changes that will be deployed.

run manually

Also you can run custom deploy for every branch in your repository:

environment variables

And select custom deployment to dev:

environment variables

← RAD Security integrationIntroduction →
  • Configure Bitbucket Pipeline to deploy function
  • Environment variables
RAD Modules
Docs
Getting startedChangelogRAD Modules API Doc
Services
SecurityMailerNotificationsServerless functionsSchedulerPdf generatorAdmin panel
Support:
GitHubhello@tsh.io
Copyright © 2021 The Software House