Drone plugins > OpenFaaS

This plugin can be used to build (generate Dockerfile and stuff) and Deploy functions to the OpenFaaS Gateway, and for the Docker image build & publish step, you can use the plugin for Kaniko or you favorite plugin.

Example

kind: pipeline
name: default

steps:
- name: deploy
  image: knovus/drone-openfaas
  settings:
    deploy: true
    yaml: my_function.yml
    image_name: ${DRONE_REPO_NAME}
    url: https://my.openfaas.com
    password:
      from_secret: openfaas_password
    registry:
      from_secret: docker_registry

Properties

  • image_name

    stringoptional

    the docker image name published.

    Default: reads the parameter from yaml file

  • registry

    stringoptional

    the registry where the Docker image is published.

    Default: none

  • url

    stringoptional

    authenticates and deploys to this OpenFaaS Gateway.

    Default: none

  • tls_no_verify

    booleanoptional

    set to true if you setup don't have a valid tls certificate.

    Default: false

  • username

    stringoptional

    the username to authenticate to the OpenFaaS Gateway.

    Default: none

  • password

    stringoptional

    the password to authenticate to the OpenFaaS Gateway.

    Secret recommended

    Default: none

  • deploy

    booleanoptional

    set to true if you want to deploy the function.

    Default: false

  • tag

    stringoptional

    repository tag strategy for the function, based on OpenFaaS TAG.

    Default: set latest

  • yaml

    stringoptional

    OpenFaaS function definition to be used. Optional.

    Default: reads stack.yml file

  • template

    stringoptional

    If you need to pull a OpenFaaS store template to build the function.

    Default: none