42 Commits

Author SHA1 Message Date
AlanCoding
dd02d56de6
Prefer devel setup.cfg and TODO marks for expected awx-plugin 2025-09-18 15:57:51 -04:00
Lila Yasin
9d9c125e47
[4.6][Backport][Feature] feat: 38589 GitHub App Authentication (#15807) (#6887)
* feat: 38589 GitHub App Authentication (#15807)

* feat: 38589 GitHub App Authentication

Allows both git@<personal-token> and x-access-token@<github-access-token> when authenticating using git.
This allows GitHub App tokens to work without interfering with existing authentication types.

---------

Co-authored-by: Jake Jackson <thedoubl3j@Jakes-MacBook-Pro.local>

* revert change made to allow UI to accept x-access-token, just use htt… (#15851)

revert change made to allow UI to accept x-access-token, just use https:// instead

* Add Github dep for new cred support if used (#15850)

* Add pygithub for new app token support

* fixed git requirements file with new
* added new github dep and relevant deps it needs

* add required licenses

* Add artifacts to satisfy license check

* Remove duplicated license

---------

Co-authored-by: Andrea Restle-Lay <arestlel@redhat.com>
Co-authored-by: Alan Rominger <arominge@redhat.com>

* Remove deps update it came with the cherry-pick and is not needed in this version

Remove unneeded deps updates from requirements.in

Remove point to awx-plugins as it is not needed in tower

* Add a credential plugin that uses GitHub Apps to get tokens

* Add github app tests

* Ran requirements updater script

Ran black on github_app_test to fix formatting issue

Add scm_github_app to managed credentials

Ran updater script to reflect new deps

Added github app info to def build_passwords in jobs.py, cred now appears in credential types

Update ManagedCredentialType for GitHub App to match what we have in awx-plugins

Update inputs in maManagedCredentialType to github_app_inputs to communicate with awx/main/credential_plugins/github_app.py

Revert incorrect change in ManagedCredentialType, change github_app_lookup to call inputs instead of github_app_inputs

Updated namespace to github_app_lookup to agree with nomenclature used in the rest of the implementation and to resolve failing API test

Remove import pointing to awx plugins and update to point to credential_plugins

Remove references to gh_app_plugin_mod and change to github_app

Remove from awx_plugins.interfaces._temporary_private_django_api import (  # noqa: WPS436 to resolve failing test

Remove flake8 typing & typing references that do not exist in this version of Tower

Remove references in jobs.py and  __init__.py since this is an external cred type and registered it in setup.cfg instead

Remove blank line

REvise name in cfg from github_app_lookup to github_app to see if that ifxes module not found error

Revise first declaration of github_app to agree with file name to see if that resolves issue

Rename line 174 to agree with what's in config

Fix reference to github_app_lookup to github_app

Linters compliaining about the github_app in __all__ not being defined, renamed to see if that aligns them

Fix naming in test to correspond to naming of cred type

Update naming to be more specific and add blank line to setup.cfg

Remove __all__ from githubapp.py to satisfy linters

Revert formatting change since it is not needed in this repository

* Add blank line at the end of requirements.in

---------

Co-authored-by: Andrea Restle-Lay <andrearestlelay@gmail.com>
Co-authored-by: Jake Jackson <thedoubl3j@Jakes-MacBook-Pro.local>
Co-authored-by: Jake Jackson <jljacks93@gmail.com>
Co-authored-by: Andrea Restle-Lay <arestlel@redhat.com>
Co-authored-by: Alan Rominger <arominge@redhat.com>
2025-04-10 14:32:17 -04:00
Gabriel Muniz
9676a95e05
Add AWS Secretsmanager plugin (#13778)
Co-authored-by: Jessica Steurer <70719005+jay-steurer@users.noreply.github.com>
2023-06-15 10:12:02 -04:00
Shane McDonald
cbea36745e Transition from setup.py to setup.cfg 2022-06-27 13:30:01 -04:00
Ryan Petrello
c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
Christian M. Adams
9672e72834
Consolidate the Local Docker installer and the dev env
- removes local_docker installer and points community users to our development environment (make docker-compose)
  - provides a migration path from Local Docker Compose installations --> the dev environment
  - the dev env can now be configured to use an external database
  - consolidated the Local Docker and dev env docker-compose.yml files into one template file, used by the dockerfile role
  - added a 'sources' role to template out config files
  - the postgres data dir is no longer a bind-mount, it is a docker volume
  - the redis socket is not longer a bind-mount, it is a docker volume
  - the local_settings.py.docker-compose file no longer needs to be copied over in the dev env
  - Create tmp rsyslog.conf in rsyslog volume to avoid cross-linking. Previously, the tmp code-generated rsyslog.conf was being written to /tmp (by default).  As a result, we were attempting to shutil.move() across volumes.
  - move k8s image build and push roles under tools/ansible
  - See tools/docker-compose/README.md for usage of these changes
2021-02-22 13:44:19 -05:00
Ryan Petrello
32542021c6
fix busted flake8 CI 2020-08-10 12:26:12 -04:00
Christian Adams
97acba8fe9 revert back to the old way of calling flake8 linter 2020-04-20 17:27:52 -04:00
Christian Adams
a899a147e1 Fix new flake8 from pyflakes 2.2.0 release 2020-04-20 09:50:50 -04:00
Yanis Guenane
07232f3694 awx-api-lint: Fix setup.cfg syntax for linter test
Signed-off-by: Yanis Guenane <yguenane@redhat.com>
2020-02-26 11:07:46 +01:00
Yanis Guenane
ca247182df yamllint: Make all files in awx pass yamllint
This commit updates all files that weren't passing yamllint for them to
pass.

A new yamllint target has been added. One can run `tox -e yamllint` or
`yamllint -s .` locally to ensure yaml files are still passing.

This check will be enabled in the CI so it can get on every new
contributions, and prevent merging non-compliant code.

Signed-off-by: Yanis Guenane <yguenane@redhat.com>
2019-12-02 15:12:51 +01:00
AlanCoding
75bb7aae14
update references to collection folder 2019-09-27 14:29:04 -04:00
AlanCoding
2f0f692f4a
Integrate Ansible core tower modules content into AWX
This commit includes all the changes involved in
converting the old Ansible Tower modules from commits
in Ansible core into the AWX collection that replaces it.
Also includes work needed to integrate it into the
AWX processes like tests, docs, and the Makefile.

Apply changes from content_collector tool

Add integrated module tests
  operate via run_module fixture
  add makefile target for them

Add flake8 target and fix flake8 errors

Update README

Make consolidated target for testing modules
2019-09-27 14:29:03 -04:00
Ryan Petrello
adaa4148c6
include awxkit CI in zuul runs
additionally, fix up some flake8 failures
2019-08-09 10:07:40 -04:00
Ryan Petrello
9bebf3217e
remove usage of import * and enforce F405 in our linter
import * is a scourge upon the earth
2019-02-13 17:10:33 -05:00
Ryan Petrello
c695ba2e10
fix flake8 2018-10-24 10:11:53 -04:00
Matthew Jones
d19ef60d97
Remove old south migrations from before a previous django upgrade 2018-03-06 14:47:09 -05:00
AlanCoding
f03b40aa50
enforce max line length of 160 characters 2017-10-11 12:38:39 -04:00
Matthew Jones
6fa283fc98
Merge branch 'release_3.2.0' into devel
* release_3.2.0: (66 commits)
  fix workflow maker lookup issues
  adding extra logic check for ansible_facts in smart search
  adding "admin_role" as a default query param for insights cred lookup
  changing insights cred lookup to not use hard coded cred type
  fix rounding of capacity percentage
  Catch potential unicode errors when looking up addrinfo
  fixing typo with adding query params for instance groups modal
  move percentage capacitty to variable
  Add unit test for inventory_sources_already_updated
  Check for inventory sources already updated from start args
  Fixed inventory completed jobs pagination bug by setting default page size
  Remove the logic blocking dependent inventory updates on callbacks
  fix instance group percentage
  Remove host-filter-modal import
  Fix partial hover highlight of host filter modal row
  Removed leading slash on basePath
  Fixed host nested groups pagination
  Added trailing slash to basePath
  Fixed nested groups pagination
  Fixed host_filter searching related fields
  ...
2017-10-10 16:09:43 -04:00
Ryan Petrello
cfe1f1e8e4
more legacy azure deprecation cleanup 2017-09-18 10:43:16 -04:00
Ryan Petrello
44702c5cfd
fix broken shippable test suite 2017-09-06 16:12:43 -07:00
Matthew Jones
fe3fd45510 Development documentation updates
* Brand new CONTRIBUTING doc
* Initial INSTALL doc
* Update README with accurate details
* Update UI README to purge Tower mentions
* Updating setup.cfg to omit some directories that cause noise
2017-08-09 15:54:58 -04:00
Matthew Jones
5bcefb7a83 Adding installer files to flake8 ignore 2017-06-30 16:25:52 -04:00
Aaron Tan
7dddae1254 Resume flake8 E302. 2016-11-15 17:31:21 -05:00
Chris Church
b7a6aa01a3 Fixes to get flake8 and unit/functional tests passing. 2016-09-18 19:11:29 -04:00
Chris Meyers
0a24a4f9b7 ignore import splat 2016-09-15 10:18:10 -04:00
Chris Meyers
01d323fd06 fix dev container pip init process 2016-04-06 14:28:34 -04:00
Chris Church
60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00
Chris Meyers
abecbb3ed1 tower api tooling
* flake8 ignore inventory plugins pulled from core
* update Dockerfile to include redis-server
2016-01-14 10:23:14 -05:00
Chris Meyers
0b4efa3fcd added git pre commit hook to run flake8 2015-11-06 07:38:29 -05:00
Matthew Jones
231a7d8f77 Add rax module to those not scanned by flake8 2015-10-12 13:52:17 -04:00
James Laska
7064c9bed4 Additional flake8 cleanup
The flake8 command was identifying several warnings and errors. This change
addresses the flake8 warnings and updates the setup.cfg with additional
exclusions. If accepted, jenkins will be updated to use the flake8 command,
rather than using the django_jenkins plugin. This will expedite jenkins
testing.
2015-05-20 20:33:22 -04:00
Chris Meyers
4f907c6645 make flake8 happy 2015-02-18 15:30:51 -05:00
Matthew Jones
6a18a50d99 Fixing flake8 errors, this should be almost all of them! 2015-02-11 16:42:55 -05:00
Matthew Jones
888ae53027 Fix up flake8 runtime configuration, do a bit of flake8 work as it
relates to pyflakes)
2015-02-05 10:40:47 -05:00
Matthew Jones
9e97783b13 Fixing up more pep8 issues 2015-02-04 16:32:14 -05:00
Matthew Jones
1d76c1cd06 More pep8 goodness 2015-02-04 14:44:38 -05:00
Matthew Jones
9b0fe1b015 Ignore E265 in pep8, it's super noisy 2015-02-04 11:47:17 -05:00
James Laska
ea0b39859b Enable django_jenkins flake8 reporting
Also exclude awx/ui from pep8 runs.
2015-01-29 13:56:04 -05:00
James Laska
f377a03c60 Sort pep8 ignores 2014-06-26 13:03:16 -04:00
Matthew Jones
6dbff4e012 Restructure pep8 configuration and document it for what we exclude 2014-06-26 12:18:54 -04:00
James Laska
f0fe6673f2 Add JENKINS_TASKS to django_jenkins
New tasks include run_pylint, run_pep8, run_pyflakes, run_jshint and
run_csslint.
2014-06-05 12:09:54 -04:00