Skip to content

Instantly share code, notes, and snippets.

@ndeloof
Created June 14, 2016 14:50
Show Gist options
  • Save ndeloof/7e0bf5d31b71c87c4fcf4c67f8a3dc51 to your computer and use it in GitHub Desktop.
Save ndeloof/7e0bf5d31b71c87c4fcf4c67f8a3dc51 to your computer and use it in GitHub Desktop.
---
- build: # stage ('build') { ...
# define the docker image used to run the build
# an implicit volume for current project's git working copy is mounted
image: maven:3.3-jdk-8
# set environment variables, use $$ for credentials injection, as used by http://readme.drone.io/usage/secrets/
environment:
- foo: bar
- nexus-password: $$nexus
commands:
- mvn install
- touch hello.txt
stash:
war: target/*.war
success: test # default on success is to run next step sequentially
failure: jira # equivalent to try .. catch. Can be either a list of commands, or a stage name (aka `goto`)
defer: # equivalent to try .. finally. inspired by go `defer`.
- some_cleanup.sh
# create jira issue on build failure
- jira:
#TODO
- test:
image: maven:3.3-jdk-8
compose:
database:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=foo
selenium:
image: selenium/firefox-standalone
commands:
- acceptance_tests.sh
notify:
slack: # here come plugins
channel: dev
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment