Skip to content

Instantly share code, notes, and snippets.

@iconnor
Created July 11, 2019 06:39
Show Gist options
  • Save iconnor/365ed61cce4bdb7fd7620281c7e7a9d5 to your computer and use it in GitHub Desktop.
Save iconnor/365ed61cce4bdb7fd7620281c7e7a9d5 to your computer and use it in GitHub Desktop.
Drone CI 1.0 config for Java, Docker, Deployment and Cypress Tests
pipeline:
build:
image: maven:3.3.9-jdk-8
commands: mvn install -DskipNpm -DskipTests
test:
image: maven:3.3.9-jdk-8
commands: mvn integration-test -DskipNpm
buildjs:
image: node:10.16.0-jessie
commands:
- npm install
- npm run build
prepare:
image: maven:3.6.0-jdk-8
commands: mvn install -DskipTests
when:
branch: master
event: push
publish_server:
image: plugins/docker:17.10
repo: projectlounge/yourdockername
dockerfile: Dockerfile
tag:
- latest
- "${DRONE_BUILD_NUMBER}"
when:
branch: master
event: push
deploy:
image: appleboy/drone-ssh
host: pg.projectlounge.com
username: root
command_timeout: 600s
# this uses a deployment script (lowest tech but works)
script:
- ./deploy_script_here.sh ${DRONE_BUILD_NUMBER}
when:
branch: master
event: push
cypress:
image: cypress/base:10
environment:
- TERM=xterm
commands:
- npm install
- npm install cypress
# See npm package file https://gist.github.com/iconnor/c103d156bf97f74b707077de5d63cff8
- npm run cypress:staging
when:
branch: master
event: push
services:
mailcather:
image: schickling/mailcatcher
postgres:
image: mdillon/postgis:9.6
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=appnamehere_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment