Browse Source

add-yaml-validator-for-ci

pull/16/head
fedy95 4 years ago
parent
commit
154fb0a8e7
  1. 17
      .drone.yml
  2. 5
      Makefile

17
.drone.yml

@ -2,8 +2,21 @@
kind: pipeline
type: docker
name: default
image_pull_secrets:
- dockerconfigjson
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
steps:
- name: validate yaml
image: registry.fedy95.com/baseimage-yamllint:latest
commands:
- yamllint -c /yamllint/relaxed.yaml .
when:
event: pull_request
- name: release
image: docker:dind
volumes:
@ -29,8 +42,4 @@ steps:
when:
event: tag
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
...

5
Makefile

@ -7,10 +7,9 @@ YAMLLINT_TAG=latest
build_yamllint:
docker build -t fedy95/baseimage:yamllint-${YAMLLINT_TAG} image -f image/Dockerfile
lint:
lint: build_yamllint
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data fedy95/baseimage:yamllint-latest .
lint_help:
lint_help: build_yamllint
docker run --rm -v $(pwd):/data fedy95/baseimage:yamllint-latest --help
.DEFAULT_GOAL := build_yamllint