More Related Content Similar to TDC2018SP | Trilha Containers - CI/CD com Docker e Drone (20) More from tdc-globalcode (20) TDC2018SP | Trilha Containers - CI/CD com Docker e Drone14. CD (entrega contínua/deploy contínuo)
Build Test Deploy
Continuous Delivery
Publish
Build Test Deploy
Continuous Deployment
Publish
21. version: 2
jobs:
build:
docker:
- image:
circleci/<language>:<version TAG>
steps:
- checkout
- run: <command>
test:
docker:
- image:
circleci/<language>:<version TAG>
steps:
- checkout
- run: <command>
workflows:
version: 2
build_and_test:
jobs:
- build
- test
language: python
python:
- "2.6"
- "2.7"
- "3.4"
- "3.5"
- "3.6"
# PyPy versions
- "pypy2.7"
- "pypy3.5"
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install .
# command to run tests
script: pytest
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}
39. version: '2'
services:
drone-server:
image: drone/drone:0.8.5
ports:
- 8000:8000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
environment:
- DRONE_OPEN=false # só admins podem logar!
- DRONE_ADMIN=fbcbarbosa
- DRONE_SECRET=1234
- DRONE_HOST=${DRONE_HOST}
- DRONE_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
drone-agent:
image: drone/agent:0.8.5
command: agent
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SECRET=1234
- DRONE_SERVER=drone-server:9000
47. $ cat plugin/heroku.sh
#!/bin/sh
cat >~/.netrc <<EOF
machine git.heroku.com
login ${PLUGIN_LOGIN}
password ${PLUGIN_TOKEN}
EOF
git push -f https://git.heroku.com/${PLUGIN_APP}.git master
Plugin
51. Drone
#1 Fácil de configurar
#2 Fácil de usar
#3 Fácil de estender
#4 Também [pode ser] barato