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
|
|
|
|
|
2020-02-15 12:57:50 +01:00
|
|
|
- name: markdown lint
|
|
|
|
image: pipelinecomponents/markdownlint:latest
|
|
|
|
commands:
|
|
|
|
- mdl --style all --warnings .
|
|
|
|
|
2020-02-15 13:02:11 +01:00
|
|
|
# use detached image / service to run dockerd
|
|
|
|
# services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:18.09-dind
|
|
|
|
environment:
|
|
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
command: [ "--storage-driver=vfs", "--tls=false" ]
|
|
|
|
privileged: true
|
|
|
|
detached: true
|
|
|
|
|
2020-02-15 00:42:17 +01:00
|
|
|
- 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
|
|
|
|