Code Monkey home page Code Monkey logo

drone-nomad's Introduction

drone-nomad

Drone plugin for deployment with Nomad

Docker Pulls

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o build/linux/amd64/drone-nomad

Docker

Build the Docker image with the following command:

make docker

Usage

docker run --rm \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  plugins/drone-nomad

Template Variables

The following variables could be configured on a nomad template with the following syntax ${VAR_NAME}.

Environment Argument Description
PLUGIN_ADDR nomad addr
PLUGIN_CONSUL_TOKEN consul token
PLUGIN_VAULT_TOKEN vault token
PLUGIN_TOKEN nomad token
PLUGIN_REGION nomad region
PLUGIN_NAMESPACE nomad namespace
PLUGIN_TEMPLATE nomad template
PLUGIN_PRESERVE_COUNTS preserve task counts when deploying (bool)
PLUGIN_WATCH_DEPLOYMENT trigger a deploy and wait till the deployment is complete (bool)
PLUGIN_WATCH_DEPLOYMENT_TIMEOUT if watch deployment is enabled, wait up to this time duration for the deploy to finish. Errors on timeout. Default: "5m" (duration string)
PLUGIN_TLS_CA_CERT tls_ca_cert nomad tls ca certificate file
PLUGIN_TLS_CA_PATH tls_ca_path nomad tls ca certificate file path
PLUGIN_TLS_CA_CERT_PEM tls_ca_cert_pem nomad tls ca certificate pem
PLUGIN_TLS_CLIENT_CERT tls_client_cert nomad tls client certificate
PLUGIN_TLS_CLIENT_CERT_PEM tls_client_cert_pem nomad tls client certificate pem
PLUGIN_TLS_CLIENT_KEY tls_client_key nomad tls client private key
PLUGIN_TLS_CLIENT_KEY_PEM tls_client_key_pem nomad tls client private key pem
PLUGIN_TLS_SERVERNAME tls_servername nomad tls server name
PLUGIN_TLS_INSECURE tls_insecure nomad tls insecure
DRONE_REPO_OWNER repository owner
DRONE_REPO_NAME repository name
DRONE_COMMIT_SHA git commit sha
DRONE_COMMIT_REF git commit ref
DRONE_COMMIT_BRANCH git commit branch
DRONE_COMMIT_AUTHOR git author name
DRONE_COMMIT_MESSAGE commit message
DRONE_BUILD_EVENT build event
DRONE_BUILD_NUMBER build number
DRONE_BUILD_PARENT build parent
DRONE_BUILD_STATUS build status
DRONE_BUILD_LINK build link
DRONE_BUILD_STARTED build started
DRONE_BUILD_CREATED build created
DRONE_TAG build tag
DRONE_JOB_STARTED job started

drone-nomad's People

Contributors

elara6331 avatar kettlebell avatar marcotuna avatar microadam avatar pteich avatar sealbro avatar urjitbhatia avatar zax-29 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

drone-nomad's Issues

Custom Env Vars

Hello,

I have some custom environment variables that I would like to replace in my template, which aren't one of the supported DRONE_xxx vars. Is it possible to use these custom ones? Or do ALL possible tokens that can be replaced have to be baked into the plugin?

HTTPS with self-signed certs: missing env var?

Thank you for this nice plugin!

In the Nomad documentation some important CLI environment variables are declared, e.g.
for the Nomad Token or TLS settings.
I see that the token is already implemented.
What about NOMAD_CACERT NOMAD_CLIENT_CERT NOMAD_CLIENT_KEY?
Especially the first would be very helpful for using HTTPS and verifying self-signed certs.

Are these env vars for TLS also available in this plugin, because I can't see them in the code.
Comparing this plugin's main.go to drone/drone-vault's I can see that the vault equivalent env vars are declared explicitly in that plugin.

Would this be something that still needs implementation?
Another question is what would be the best way to add a self-signed ca.crt to drone-nomad...
Is host-volume the only option?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.