From df16eee7121786fa4967726746c89b0f33fe5c10 Mon Sep 17 00:00:00 2001 From: kleph Date: Wed, 25 Mar 2020 13:34:41 +0100 Subject: [PATCH 1/4] [CI] Add som linters (yaml, docker and markdown) --- .drone.yml | 22 ++++++++++++++++++++++ .yamllint | 9 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 .yamllint diff --git a/.drone.yml b/.drone.yml index 397ce79..06a8c85 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,23 @@ +--- +kind: pipeline +name: lint + +steps: +- name: yaml lint + image: cytopia/yamllint + commands: + - yamllint . + +- name: docker lint + image: hadolint/hadolint + commands: + - hadolint Dockerfile # ignore pinning version in pip + +- name: markdown lint + image: pipelinecomponents/markdownlint:latest + commands: + - mdl --style all --warnings . + --- kind: pipeline name: build @@ -16,6 +36,8 @@ steps: event: exclude: - pull_request +depends_on: +- lint --- deploy_commands_alias: diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..9fb2ded --- /dev/null +++ b/.yamllint @@ -0,0 +1,9 @@ +--- +extends: default + +rules: + indentation: + indent-sequences: consistent + line-length: + max: 170 + level: warning -- 2.45.2 From 965a22a198f1ab279b0f97ed9475dae9d4c9232f Mon Sep 17 00:00:00 2001 From: kleph Date: Wed, 25 Mar 2020 13:42:53 +0100 Subject: [PATCH 2/4] Please yaml lint --- .drone.yml | 1 - kube/q3-serviceaccount-deploy.yaml | 2 +- kube/q3-status-service.yaml | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 06a8c85..601e6ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -104,4 +104,3 @@ steps: depends_on: - build - diff --git a/kube/q3-serviceaccount-deploy.yaml b/kube/q3-serviceaccount-deploy.yaml index 6c040f8..9830356 100644 --- a/kube/q3-serviceaccount-deploy.yaml +++ b/kube/q3-serviceaccount-deploy.yaml @@ -10,7 +10,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: q3-deploy-role - namespace: q3 # Should be namespace you are granting access to + namespace: q3 rules: - apiGroups: ["*"] resources: ["*"] diff --git a/kube/q3-status-service.yaml b/kube/q3-status-service.yaml index f5e55fa..b02dcb3 100644 --- a/kube/q3-status-service.yaml +++ b/kube/q3-status-service.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: Service metadata: -- 2.45.2 From 23044b4d103b7a42e880b9f2fb376142a1c6b1e0 Mon Sep 17 00:00:00 2001 From: kleph Date: Wed, 25 Mar 2020 13:44:19 +0100 Subject: [PATCH 3/4] Please docker lint --- .hadolint.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .hadolint.yaml diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..ffe5064 --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,3 @@ +--- +ignored: +- DL3013 -- 2.45.2 From 23b180390a5ba9dcf71acad49331958e51400285 Mon Sep 17 00:00:00 2001 From: kleph Date: Wed, 25 Mar 2020 13:46:10 +0100 Subject: [PATCH 4/4] Please markdown lint --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a35fee0..942e22e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # q3_server_status [![Build Status](https://drone.kleph.eu/api/badges/kleph/q3_server_status/status.svg)](https://drone.kleph.eu/kleph/q3_server_status) -Q3 communication module is taken from here : https://github.com/gak/pyquake3 +Q3 communication module is taken from here : (thanks ! :) ) -- 2.45.2