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

[WIP] Project update sync assets (round 2) #9129

Closed
wants to merge 25 commits into from

Conversation

john-westcott-iv
Copy link
Member

@john-westcott-iv john-westcott-iv commented Jan 21, 2021

SUMMARY

This PR replaces PR #7099

This is an initial cut as having parts of Tower being controlled by code. A project update of an SCM based project will not attempt to create job templates and workflow job templates from files within the source. The current proposed files are:
assets/job_templates.yml
assets/workflow_job_template_nodes.yml
assets/workflow_job_templates.yml

This PR (currently):

  • Adds a "Sync Assets" checkbox to the project UI screen. If enabled, during a manually invoked project sync the project_update.yml playbook will now include a role which will read these files and then leverage the awx.awx collection to build assets within tower.
  • Adds an export endpoint to project API (still needs work).
  • Adds a PROJECT_SYNC_ACCESS_TOKEN_EXPIRE_SECONDS setting
  • Modifies UI for project export job types

Related
#526
#578

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • API
  • UI
AWX VERSION
16.0.0
ADDITIONAL INFORMATION

@shanemcd
Copy link
Member

Like we talked about earlier, I would be interested in seeing if we can associate a Tower credential to the project and use that instead of obtaining an oauth token behind the scenes.

@john-westcott-iv
Copy link
Member Author

@ryanpetrello @wenottingham Should we allow for relaunch on a project export. Keeping in mind that an export takes a commit message and a list of job template IDs. On a failure I suppose it would make sense. However, on a successful job export would we want people to be able to relaunch with the same commit message?

@john-westcott-iv
Copy link
Member Author

Like we talked about earlier, I would be interested in seeing if we can associate a Tower credential to the project and use that instead of obtaining an oauth token behind the scenes.

@shanemcd @wenottingham If we use a Tower credential type for the project export it has a field called Ansible Tower Hostname (thats required). I feel like I should respect this when making the connection to Tower (right now I use TOWER_URL_BASE setting). This could lead to awkwardness on an export if someone does not populate that correctly. Any thoughts on this?

@unlikelyzero
Copy link

@john-westcott-iv , i'll take a stab at testing this from the ui-side when you're ready for review

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@shanemcd
Copy link
Member

shanemcd commented Oct 2, 2021

Holy conflicts. Please let me know if you still want this.

@john-westcott-iv
Copy link
Member Author

I def sill want it but didn't have the time to put it in before the 4.0 release so this will have to be completely refactored later. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants