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 syntax checks to tox #3938

Merged
merged 1 commit into from
Apr 19, 2017

Conversation

mtnbikenc
Copy link
Member

Adds syntax checking for entry point playbooks to standard tox checks run by CI. An entry point playbook is identified as being a .yml/.yaml file containing initialize_groups.yml.

This PR will fail Travis CI until #3936 and #3937 are merged.

@mtnbikenc mtnbikenc self-assigned this Apr 17, 2017
Copy link
Contributor

@tbielawa tbielawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see "ERROR" prefix that line, but I won't stop this from moving forward if you don't want to.

setup.py Outdated
print('Execution failed: %s' % cpe)
has_errors = True
if has_errors:
print('Ansible syntax-check issues found')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran this test (python setup.py ansible_syntax) and got the error message above ^

nit: Ansible syntax-check issues found is a pretty mundane looking output message. Could we prefix that with ERROR: or something? I almost missed it (though, there were obvious errors printed in the messages above that lint).

I won't block on it though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with dropping that message altogether. It is not really providing much value. I'd rather have the lines with Execution failed printed in red. Whenever I'm looking through Travis logs, I scroll down looking for red. The only thing that is reported in red for the syntax check is the final InvocationError:, then you have to scroll back up to see all the individual errors.

@mtnbikenc
Copy link
Member Author

@tbielawa Made a few changes regarding the output style. Colorized the individual error messages and dropped the less useful print statements.

@tbielawa
Copy link
Contributor

@mtnbikenc looks great. I was thinking red too. Nice touch. 👍

@mtnbikenc mtnbikenc changed the title [WIP] Add Ansible syntax checks to tox Add Ansible syntax checks to tox Apr 19, 2017
@mtnbikenc
Copy link
Member Author

aos-ci-test

@mtnbikenc
Copy link
Member Author

[merge]

@openshift-bot
Copy link

Evaluated for openshift ansible merge up to b1898ac

@openshift-bot
Copy link

[test]ing while waiting on the merge queue

@openshift-bot
Copy link

Evaluated for openshift ansible test up to b1898ac

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for b1898ac (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for b1898ac (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for b1898ac (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_containerized, aos-ci-jenkins/OS_3.6_containerized_e2e_tests" for b1898ac (logs)

@openshift-bot
Copy link

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_openshift_ansible/56/) (Base Commit: 9ace041)

@openshift-bot
Copy link

openshift-bot commented Apr 19, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_openshift_ansible/259/) (Base Commit: b0b66e5)

@openshift-bot openshift-bot merged commit f756392 into openshift:master Apr 19, 2017
@mtnbikenc mtnbikenc deleted the syntax-check branch April 20, 2017 12:14
@ingvagabund ingvagabund mentioned this pull request Jun 2, 2017
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants