beer/.drone.yml

43 lines
921 B
YAML
Raw Normal View History

2020-02-14 01:06:37 +01:00
kind: pipeline
2020-02-15 00:42:17 +01:00
name: lint and build
2020-02-14 01:06:37 +01:00
steps:
- name: pylint
image: python:slim
commands:
- "echo \"==> Pylint ...\""
- pip install -r requirements.txt
- pip install pylint
- pylint *.py
2020-02-15 00:42:17 +01:00
- name: docker lint
2020-02-14 01:06:37 +01:00
image: hadolint/hadolint
commands:
- hadolint --ignore DL3013 Dockerfile # ignore pinning version in pip
- name: w3c validator
image: validator/validator:latest
commands:
2020-02-15 00:42:17 +01:00
- vnu static/*.html
- name: build image
image: docker:stable
environment:
2020-02-15 12:16:17 +01:00
DOCKER_HOST: tcp://docker:2375
2020-02-15 12:48:36 +01:00
USERNAME:
from_secret: dockerhub_username
PASSWORD:
from_secret: dockerhub_password
2020-02-15 00:42:17 +01:00
commands:
- docker build -t kleph/beer .
2020-02-15 12:48:36 +01:00
- docker login -u $USERNAME -p $PASSWORD
2020-02-15 12:35:05 +01:00
- docker image push kleph/beer
2020-02-15 00:42:17 +01:00
services:
- name: docker
2020-02-15 12:16:17 +01:00
image: docker:18.09-dind
2020-02-15 12:09:36 +01:00
environment:
DOCKER_TLS_CERTDIR: ""
2020-02-15 00:42:17 +01:00
command: [ "--storage-driver=vfs", "--tls=false" ]
2020-02-15 11:59:32 +01:00
privileged: true