Test linting osh on helm-toolkit changes
Since most of the charts in both openstack-helm and this repo use helm-toolkit, changes in helm-toolkit have the possibility of impacting charts in the openstack-helm repo and will not be caught in testing here. This change adds a conditional linter to lint the charts in the openstack-helm repo if any changes to helm-toolkit are made. Change-Id: I0f6a935eca53d966c01e0902e546ea132a636a9d
This commit is contained in:
parent
b2dd2f77e9
commit
ddb377df6d
@ -31,6 +31,12 @@
|
|||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
target: all
|
target: all
|
||||||
|
|
||||||
|
- name: make all osh
|
||||||
|
make:
|
||||||
|
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('../openstack-helm/') }}"
|
||||||
|
target: all
|
||||||
|
when: lint_osh is defined
|
||||||
|
|
||||||
- name: Prevent trailing whitespaces
|
- name: Prevent trailing whitespaces
|
||||||
shell: find . \! \( -path "*/\.*" -o -path "*/doc/build/*" -o -name "*.tgz" -o -name "*.png" \) -type f -exec egrep -l " +$" {} \;
|
shell: find . \! \( -path "*/\.*" -o -path "*/doc/build/*" -o -name "*.tgz" -o -name "*.png" \) -type f -exec egrep -l " +$" {} \;
|
||||||
register: _found_whitespaces
|
register: _found_whitespaces
|
||||||
@ -66,4 +72,10 @@
|
|||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}"
|
chdir: "{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}"
|
||||||
when: yamllintconf.stat.exists == True
|
when: yamllintconf.stat.exists == True
|
||||||
|
|
||||||
|
- name: Execute yamllint check for osh values* yaml files
|
||||||
|
command: tox -e lint
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('../openstack-helm/') }}"
|
||||||
|
when: yamllintconf.stat.exists == True and lint_osh is defined
|
||||||
...
|
...
|
||||||
|
@ -23,6 +23,17 @@
|
|||||||
irrelevant-files:
|
irrelevant-files:
|
||||||
- ^.*\.rst$
|
- ^.*\.rst$
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
|
- ^releasenotes/.*$
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-helm-lint-osh
|
||||||
|
parent: openstack-helm-lint
|
||||||
|
required-projects:
|
||||||
|
- openstack/openstack-helm
|
||||||
|
files:
|
||||||
|
- ^helm-toolkit/.*$
|
||||||
|
vars:
|
||||||
|
lint_osh: true
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: publish-openstack-helm-charts
|
name: publish-openstack-helm-charts
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-helm-lint
|
- openstack-helm-lint
|
||||||
|
- openstack-helm-lint-osh
|
||||||
- openstack-helm-infra-bandit
|
- openstack-helm-infra-bandit
|
||||||
- openstack-helm-infra-deploy
|
- openstack-helm-infra-deploy
|
||||||
- openstack-helm-infra-aio-logging
|
- openstack-helm-infra-aio-logging
|
||||||
@ -37,6 +38,7 @@
|
|||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-helm-lint
|
- openstack-helm-lint
|
||||||
|
- openstack-helm-lint-osh
|
||||||
- openstack-helm-infra-aio-logging
|
- openstack-helm-infra-aio-logging
|
||||||
- openstack-helm-infra-aio-monitoring
|
- openstack-helm-infra-aio-monitoring
|
||||||
- openstack-helm-infra-openstack-support
|
- openstack-helm-infra-openstack-support
|
||||||
|
Loading…
Reference in New Issue
Block a user