Step by step, to show how to build a powerful team development workflow with CI
- Use drone cloud or setup a private drone by k8s
Kubernetes config files under ./kubernetes
- prepare
.drone.yml
kind: pipeline
name: deploy
steps:
- name: hello-world
image: docker
commands:
- echo "hello world"
-
Add a secret in Drone, key is
DOCKER_PASSWORD
, value is your docker registry password -
prepare
.drone.yml
kind: pipeline
name: deploy
steps:
- name: unit-test
image: node:10
commands:
- node test/index.js
when:
branch: master
event: push
- name: build-image
image: plugins/docker
settings:
repo: allovince/drone-ci-demo
username: allovince
password:
from_secret: DOCKER_PASSWORD
auto_tag: true
when:
event: tag
-
push to master branch will trigger unit test
-
manually release on github will trigger building docker image
Change .drone.yml
as this
Change .drone.yml
as this