This commit is contained in:
parent
0774e23801
commit
b571066ba4
6 changed files with 38 additions and 31 deletions
55
.drone.yml
55
.drone.yml
|
@ -1,22 +1,23 @@
|
||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: lint
|
name: lint
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- 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: yaml lint
|
- name: yaml lint
|
||||||
image: cytopia/yamllint
|
image: cytopia/yamllint
|
||||||
commands:
|
commands:
|
||||||
- yamllint .
|
- 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
|
- name: w3c validator
|
||||||
image: validator/validator:latest
|
image: validator/validator:latest
|
||||||
|
@ -26,7 +27,7 @@ steps:
|
||||||
- name: markdown lint
|
- name: markdown lint
|
||||||
image: pipelinecomponents/markdownlint:latest
|
image: pipelinecomponents/markdownlint:latest
|
||||||
commands:
|
commands:
|
||||||
- mdl --style all --warnings .
|
- mdl --style all --warnings .
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -47,15 +48,15 @@ steps:
|
||||||
- docker image push kleph/beer
|
- docker image push kleph/beer
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: docker
|
- name: docker
|
||||||
image: docker:18.09-dind
|
image: docker:18.09-dind
|
||||||
environment:
|
environment:
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
command: [ "--storage-driver=vfs", "--tls=false" ]
|
command: ["--storage-driver=vfs", "--tls=false"]
|
||||||
privileged: true
|
privileged: true
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- lint
|
- lint
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -75,12 +76,12 @@ steps:
|
||||||
KUBE_CA:
|
KUBE_CA:
|
||||||
form_secret: kubectl_ca
|
form_secret: kubectl_ca
|
||||||
commands:
|
commands:
|
||||||
- kubectl
|
- kubectl
|
||||||
- cat kube/kubeconfig_template.yaml | envsubst > /.kube/config
|
- cat kube/kubeconfig_template.yaml | envsubst > /.kube/config
|
||||||
- kubectl get pods
|
- kubectl get pods
|
||||||
- kubectl get deployments
|
- kubectl get deployments
|
||||||
- kubectl get svc
|
- kubectl get svc
|
||||||
- kubectl apply -f kube/beer-deployment.yaml
|
- kubectl apply -f kube/beer-deployment.yaml
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
|
|
6
.yamllint
Normal file
6
.yamllint
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
indentation:
|
||||||
|
indent-sequences: consistent
|
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -18,4 +19,3 @@ spec:
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -13,4 +14,3 @@ spec:
|
||||||
backend:
|
backend:
|
||||||
serviceName: beer
|
serviceName: beer
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -9,4 +10,3 @@ spec:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 5000
|
targetPort: 5000
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
clusters:
|
clusters:
|
||||||
- cluster:
|
- cluster:
|
||||||
|
@ -17,4 +18,3 @@ users:
|
||||||
user:
|
user:
|
||||||
password: ${KUBE_PASSWORD}
|
password: ${KUBE_PASSWORD}
|
||||||
username: ${KUBE_USERNAME}
|
username: ${KUBE_USERNAME}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue