GithubHelp home page GithubHelp logo

faolain / drone-rancher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from majest/drone-rancher

0.0 2.0 0.0 11 KB

drone-rancher plugin 0.5 compatible

Home Page: https://hub.docker.com/r/majest/drone-rancher/

Standard ML 7.91% Makefile 9.77% Go 82.32%

drone-rancher's Introduction

drone-rancher

Drone plugin to deploy or update a project on Rancher.

This is unofficial drone-rancher plugin for drone v0.5

Docker image available at: https://hub.docker.com/r/majest/drone-rancher/

Config

The following parameters are used to configure this plugin in .drone.yml:

  • rancher_url - url to your rancher server, including protocol and port
  • access_key - rancher api access key
  • secret_key - rancher api secret key
  • stack - name of rancher stack to deploy to
  • service - name of rancher service that's in the given stack to act on
  • docker_image - new image to assign to service, including tag (drone/drone:latest)
  • start_first - start the new container before stopping the old one, defaults to true
  • confirm - auto confirm the service upgrade if successful, defaults to false
  • timeout - the maximum wait time in seconds for the service to upgrade, default to 30

The following secret values can be set to configure the plugin by command line.

  • PLUGIN_RANCHER_URL corresponds to rancher_url
  • PLUGIN_ACCESS_KEY corresponds to access_key
  • PLUGIN_SECRET_KEY corresponds to secret_key
  • PLUGIN_STACK corresponds to stack
  • PLUGIN_SERVICE corresponds to service
  • PLUGIN_DOCKER_IMAGE corresponds to docker_image
  • PLUGIN_START_FIRST corresponds to start_first
  • PLUGIN_CONFIRM corresponds to confirm
  • PLUGIN_TIMEOUT corresponds to timeout

The following is a sample Rancher configuration in your .drone.yml file:

deploy:
  image: majest/drone-rancher
  rancher_url: https://example.rancher.com
  access_key: 1234567abcdefg
  secret_key: abcdefg1234567
  stack: mystack
  service: myservice
  docker_image: drone/drone:latest

You can also add secrets via command line instead of adding them to your drone.yml by


drone secret add --image=majest/drone-rancher {$YOUR_REPO} PLUGIN_ACCESS_KEY {$YOURACCESSKEY}
drone secret add --image=majest/drone-rancher {$YOUR_REPO} PLUGIN_SECRET_KEY {$YOURSECRETKEY}

# don't forget to sign your .drone.yml.sig after changing the .drone.yml by 

drone sign exocode/gn2016

drone-rancher's People

Contributors

jamrizzi avatar majest avatar

Watchers

 avatar  avatar

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.