Skip to content

Instantly share code, notes, and snippets.

@khorevaa
Forked from ndeloof/Jenkinsfile.yml
Created March 9, 2017 17:23
Show Gist options
  • Save khorevaa/21fbe5ee22af913bbf0fc34f145ee8fa to your computer and use it in GitHub Desktop.
Save khorevaa/21fbe5ee22af913bbf0fc34f145ee8fa 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