mirror of
https://github.com/josmo/drone-rancher.git
synced 2026-06-14 05:13:01 +08:00
c1ed692bf0
Maybe its not bad idea to bring it in to readme, so it will be more visible. DroneCi suffer chronically from bad documentation.
1.7 KiB
Executable File
1.7 KiB
Executable File
Use the rancher plugin to upgrade a service in rancher.
The following parameters are used to configure this plugin:
url- url to your rancher server, including protocol and portaccess_key- rancher api access keysecret_key- rancher api secret keyservice- name of rancher service to act ondocker_image- new image to assign to service, including tag (drone/drone:latest)sidekick- sidekick name and docker image separated by space, multiple declaration supportedstart_first- start the new container before stopping the old one, defaults totrueconfirm- auto confirm the service upgrade if successful, defaults tofalsetimeout- the maximum wait time in seconds for the service to upgrade, default to30interval_millis- the upgrade interval in milli seconds, defaults to1000batch_size- the upgrade batch size, defaults to1
The following is a sample Rancher configuration in your .drone.yml file:
deploy:
rancher:
image: peloton/drone-rancher
url: https://example.rancher.com
access_key: 1234567abcdefg
secret_key: abcdefg1234567
service: drone/drone
sidekick: nginx nginx:latest
sidekick: node node:latest
docker_image: drone/drone:latest
if you want to add secrets for the access_key and secret_key it's RANCHER_ACCESS_KEY and RANCHER_SECRET_KEY
Note that if your service is part of a stack, you should use the notation stackname/servicename as this will make sure that the found service is part of the correct stack. If no stack is specified, this plugin will update the first service with a matching name which may not be what you want.