Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ansible-lint CI step #4411

Merged

Conversation

Projects
None yet
5 participants
@MarkusTeufelberger
Copy link
Contributor

commented Mar 31, 2019

This is a more limited version of #4177 which just runs ansible-lint in CI with all rules disabled that are causing errors anywhere. It stops regressions within these rules and allows follow-up PRs to fix the code base and enable further rules, such as #4201.

The second commit is to get ansible-lint to run at all (it seems to fail on a "clever" jinja2 expression in an include_tasks task).

There are also multiple warnings about not being able to open certain files, this is usually caused by roles importing tasks from different roles using relative paths (which are sometimes wrong). Since I don't have the means currently to verify if fixing these relative paths to make ansible-lint work correctly doesn't introduce regressions, I left them out for now. I can add them if needed/requested.

@Miouge1

This comment has been minimized.

Copy link
Member

commented Apr 5, 2019

ci check this

/lgtm

@MarkusTeufelberger

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2019

/assign @Atoms

@k8s-ci-robot k8s-ci-robot removed the lgtm label Apr 7, 2019

@MarkusTeufelberger

This comment has been minimized.

Copy link
Contributor Author

commented Apr 7, 2019

I set the output to verbose, this drowns the warnings a bit, but makes it easier to see what actually gets checked.

@woopstar woopstar added this to the 2.10 milestone Apr 9, 2019

@Miouge1

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Apr 9, 2019

@woopstar

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MarkusTeufelberger, woopstar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit d2a1ac3 into kubernetes-sigs:master Apr 10, 2019

10 of 11 checks passed

tide Not mergeable. Needs approved label.
Details
Kubespray CI - ansible-lint Build Succeeded
Details
Kubespray CI - ci-authorized Build Succeeded
Details
Kubespray CI - gce_centos7-flannel-addons Build Succeeded
Details
Kubespray CI - gce_coreos-calico-aio Build Succeeded
Details
Kubespray CI - gce_ubuntu18-flannel-aio Build Succeeded
Details
Kubespray CI - syntax-check Build Succeeded
Details
Kubespray CI - yamllint Build Succeeded
Details
Kubespray CI Pipeline Pipeline Succeeded
Details
cla/linuxfoundation MarkusTeufelberger authorized
Details
kubespray-ci/pipeline Pipeline Succeeded
Details

LuckySB added a commit to centosadmin/kubespray that referenced this pull request May 5, 2019

Add Ansible-lint CI step (kubernetes-sigs#4411)
* Add ansible-lint as gitlab-ci step

* Fix jinja2 syntax in include_tasks that breaks ansible-lint

* Use a block scalar to get around gitlab quoting/escaping rules

* Run ansible-lint in verbose mode in CI

spaced pushed a commit to spaced/kubespray that referenced this pull request May 21, 2019

Add Ansible-lint CI step (kubernetes-sigs#4411)
* Add ansible-lint as gitlab-ci step

* Fix jinja2 syntax in include_tasks that breaks ansible-lint

* Use a block scalar to get around gitlab quoting/escaping rules

* Run ansible-lint in verbose mode in CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.