Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

nebula-orchestrator/drone-nebula

Repository files navigation

Warning Drone cloud stopped working for months and as the developers of Drone seemed to stop caring I'm no longer able to fully test this nor will I longer have any use of it, as a result I'm stopping all development of this plugin.

drone-nebula

CI/CD build status: Build Status

Code coverage: codecov

Drone plugin for deploying to nebula.

Usage

This plugin can be used to deploy applications to a nebula server, it will create\update the given nebula tasks as needed.

The below pipeline configuration demonstrates simple usage:

In addition to the .drone.yml file you will need to create a nebula.json file that contains the nebula configuration as well as the "app_name" (for app) or "cron_job_name" (for cron_job) field. Please see here for an example.

kind: pipeline
type: docker
name: default

steps:
- name: nebula_deploy
  image: nebulaorchestrator/drone-nebula
  settings:
    nebula_host: my-nebula-host.com
    nebula_job_file: nebula.json

Value substitution

Example configuration with values substitution:

kind: pipeline
type: docker
name: default

steps:
- name: nebula_deploy
  image: nebulaorchestrator/drone-nebula
  settings:
    nebula_host: my-nebula-host.com
    nebula_job_file: nebula.json
    my_image_tag: my_dynamic_image

In the nebula.json file (please note the $ before the PLUGIN_MY_IMAGE_TAG key):

{
  ...
  "image": "myrepo/myimage:$PLUGIN_MY_IMAGE_TAG",
  ...
}

will result in:

{
  ...
  "image": "myrepo/myimage:my_dynamic_image",
  ...
}

Parameter Reference

nebula_host

The nebula server FQDN\IP, required

nebula_job_file

The nebula configuration file location relative to the root folder of the repo, defaults to nebula.json

nebula_username

The nebula basic_auth username to use, defaults to None (no basic auth is used)

nebula_password

The nebula basic_auth password to use, defaults to None (no basic auth is used)

nebula_token

The nebula token_auth token to use, defaults to None (no token auth is used)

nebula_port

The nebula server port, defaults to 80

nebula_protocol

The nebula server protocol, defaults to "http"

nebula_job_type

The type of nebula job, "app" or "cron_job", defaults to "app"