beer/.drone.yml
kleph 46ccd88278
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
[CI] Please linter
2020-02-22 02:58:52 +01:00

70 lines
1.2 KiB
YAML

---
kind: pipeline
name: lint
steps:
- name: yaml lint
image: cytopia/yamllint
commands:
- yamllint .
- name: pylint
image: eeacms/pylint
commands:
- pip install -r requirements.txt
- pylint *.py
- name: docker lint
image: hadolint/hadolint
commands:
- hadolint --ignore DL3013 Dockerfile # ignore pinning version in pip
- name: w3c validator
image: validator/validator:latest
commands:
- vnu static/*.html
- name: markdown lint
image: pipelinecomponents/markdownlint:latest
commands:
- mdl --style all --warnings .
---
kind: pipeline
name: build
steps:
- name: build image
image: plugins/docker
settings:
repo: kleph/beer
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
depends_on:
- lint
---
kind: pipeline
name: deploy
steps:
- name: deploy
image: sinlead/drone-kubectl
settings:
kubernetes_server:
from_secret: kubectl_uri
kubernetes_cert:
from_secret: kubectl_cert
kubernetes_token:
from_secret: kubectl_token
commands:
- kubectl get pods --namespace=beer
- kubectl get deployments --namespace=beer
- kubectl get svc --namespace=beer
- kubectl apply -f kube/beer-deployment.yaml --namespace=beer
depends_on:
- build