Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[meta] test python scripts formating in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlrt committed Feb 10, 2020
1 parent 778aa09 commit 00e154d
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .ci/jobs/elastic+helm-charts+master+template-lint-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- job:
name: elastic+helm-charts+master+lint-python
display-name: elastic / helm-charts - master - lint python
description: Master - lint python
scm:
- git:
wipe-workspace: 'True'
axes:
- axis:
type: slave
name: label
values:
- docker&&virtual
builders:
- shell: |-
#!/usr/local/bin/runbld
set -euo pipefail
make lint-python
2 changes: 2 additions & 0 deletions .ci/jobs/elastic+helm-charts+master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
projects:
- name: elastic+helm-charts+master+template-testing
current-parameters: true
- name: elastic+helm-charts+master+lint-python
current-parameters: true
- name: elastic+helm-charts+master+cluster-creation
current-parameters: true
- multijob:
Expand Down
20 changes: 20 additions & 0 deletions .ci/jobs/elastic+helm-charts+pull-request+lint-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- job:
name: elastic+helm-charts+pull-request+lint-python
display-name: elastic / helm-charts - pull-request - lint python
description: Pull request - lint python
scm:
- git:
refspec: +refs/pull/*:refs/remotes/origin/pr/*
axes:
- axis:
type: slave
name: label
values:
- docker&&virtual
builders:
- shell: |-
#!/usr/local/bin/runbld
set -euo pipefail
make lint-python
3 changes: 3 additions & 0 deletions .ci/jobs/elastic+helm-charts+pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
- name: elastic+helm-charts+pull-request+template-testing
current-parameters: true
predefined-parameters: branch_specifier=${ghprbActualCommit}
- name: elastic+helm-charts+pull-request+lint-python
current-parameters: true
predefined-parameters: branch_specifier=${ghprbActualCommit}
- name: elastic+helm-charts+pull-request+cluster-creation
current-parameters: true
predefined-parameters: branch_specifier=${ghprbActualCommit}
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include helpers/common.mk
3 changes: 3 additions & 0 deletions helpers/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ helm:
kubectl get cs
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default || true
helm init --wait --upgrade

lint-python:
black --diff --check .
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
atomicwrites==1.3.0
attrs==19.1.0
black==19.10b0
importlib-metadata==0.23
more-itertools==7.2.0
pluggy==0.13.0
Expand Down

0 comments on commit 00e154d

Please sign in to comment.