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

Added support for GitHub Enterprise to github_deploy_key module #59564

Merged
merged 1 commit into from Feb 16, 2020

Conversation

bincyber
Copy link
Contributor

SUMMARY

Updated github_deploy_key to support GitHub Enterprise by allowing users to specify the URL for the GitHub API

Feature requested in #59560

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • github_deploy_key
ANSIBLE VERSION
ansible 2.8.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.3 (default, May 11 2019, 00:45:16) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Jul 25, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:0: syntax-error invalid syntax (<unknown>, line 249)

The test ansible-test sanity --test ansible-doc [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 249)

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
PYTHONPATH=../../lib ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:98: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 88, in <module>
    main()
  File "../../hacking/build-ansible.py", line 79, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 698, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, in get_plugin_info
    doc, examples, returndocs, metadata = plugin_docs.get_docstring(module_path, fragment_loader, verbose=verbose)
  File "/root/ansible/lib/ansible/utils/plugin_docs.py", line 111, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/root/ansible/lib/ansible/parsing/plugin_docs.py", line 40, in read_docstring
    M = ast.parse(b_module_data.read())
  File "/usr/lib/python3.6/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 249
    github_url=key=dict(required=False, type='str', default="https://api.github.com"),
                  ^
SyntaxError: invalid syntax
make: *** [modules] Error 1

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: github_url=key=dict(required=False, type='str', default="https://api.github.com"),

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: github_url=key=dict(required=False, type='str', default="https://api.github.com"),

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: github_url=key=dict(required=False, type='str', default="https://api.github.com"),

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: github_url=key=dict(required=False, type='str', default="https://api.github.com"),

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: github_url=key=dict(required=False, type='str', default="https://api.github.com"),

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: github_url=key=dict(required=False, type='str', default="https://api.github.com"),

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: SyntaxError: invalid syntax

The test ansible-test sanity --test validate-modules [explain] failed with 4 errors:

lib/ansible/modules/source_control/github_deploy_key.py:0:0: E401 Python SyntaxError while parsing module
test/sanity/validate-modules/ignore.txt:3118:1: A100 Ignoring 'E336' on 'lib/ansible/modules/source_control/github_deploy_key.py' is unnecessary
test/sanity/validate-modules/ignore.txt:3119:1: A100 Ignoring 'E337' on 'lib/ansible/modules/source_control/github_deploy_key.py' is unnecessary
test/sanity/validate-modules/ignore.txt:3120:1: A100 Ignoring 'E338' on 'lib/ansible/modules/source_control/github_deploy_key.py' is unnecessary

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/modules/source_control/github_deploy_key.py:249:27: python-syntax-error invalid syntax (<unknown>, line 249)

click here for bot help

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. owner_pr This PR is made by the module's maintainer. python3 source_control Source-control category support:community This issue/PR relates to code supported by the Ansible community. labels Jul 25, 2019
@bincyber
Copy link
Contributor Author

The above issues will be fixed when #36876 is merged and this commit is rebased to include those changes.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jul 25, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 8, 2019
@goneri goneri added the ci_verified Changes made in this PR are causing tests to fail. label Oct 2, 2019
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html new_module This PR includes a new module. new_plugin This PR includes a new plugin. and removed owner_pr This PR is made by the module's maintainer. labels Nov 11, 2019
@bincyber bincyber force-pushed the ISSUE-59560-github-deploy-key branch 2 times, most recently from 5bc24de to 99f34c9 Compare December 5, 2019 10:12
@ansibot
Copy link
Contributor

ansibot commented Dec 5, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/source_control/github/github_deploy_key.py:0:0: option-incorrect-version-added: version_added for new option (github_url) should be '2.10'. Currently StrictVersion ('2.9')

click here for bot help

@ansibot ansibot added owner_pr This PR is made by the module's maintainer. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html new_module This PR includes a new module. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 5, 2019
@bincyber bincyber force-pushed the ISSUE-59560-github-deploy-key branch from 99f34c9 to 4a4cc72 Compare December 5, 2019 10:31
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Dec 5, 2019
@bincyber
Copy link
Contributor Author

bincyber commented Dec 5, 2019

ready_for_review

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Dec 5, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 15, 2019
@bincyber
Copy link
Contributor Author

@Akasurde @gundalow please review

@gundalow gundalow merged commit 4733af3 into ansible:devel Feb 16, 2020
@gundalow
Copy link
Contributor

Thanks!

@bincyber bincyber deleted the ISSUE-59560-github-deploy-key branch February 16, 2020 20:32
@ansible ansible locked and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 community_review In order to be merged, this PR must follow the community review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. new_plugin This PR includes a new plugin. owner_pr This PR is made by the module's maintainer. python3 source_control Source-control category stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants