-
Notifications
You must be signed in to change notification settings - Fork 8
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
Seed workflows from plugins' content/workflows #57
Conversation
e1dce21
to
d64380c
Compare
manager = ManageIQ::Providers::Workflows::AutomationManager.in_my_region.first | ||
return if manager.nil? | ||
|
||
manager.configuration_script_sources.find_or_create_by!(:type => name, :name => "Embedded Workflows") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the name here. I think I'd prefer ManageIQ
as the name similar to how we named the built-in automate domain as ManageIQ
, but I'm not sure. Productization-wise it's a little weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, how to we productize the builtin automate domain? We could use a Setting and then override that
end | ||
|
||
def git_repository | ||
return super unless name == "Embedded Workflows" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move the "internal" name into a constant so it's shared with the create side.
This is really cool! Looking forward to this. |
app/models/manageiq/providers/workflows/automation_manager/workflow.rb
Outdated
Show resolved
Hide resolved
52720f1
to
d02cb1b
Compare
app/models/manageiq/providers/workflows/automation_manager/workflow.rb
Outdated
Show resolved
Hide resolved
Hey @Fryguy this has been out there for a while, what do you think? |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
9e505bd
to
59755fc
Compare
app/models/manageiq/providers/workflows/automation_manager/workflow.rb
Outdated
Show resolved
Hide resolved
app/models/manageiq/providers/workflows/automation_manager/configuration_script_source.rb
Outdated
Show resolved
Hide resolved
app/models/manageiq/providers/workflows/automation_manager/configuration_script_source.rb
Outdated
Show resolved
Hide resolved
app/models/manageiq/providers/workflows/automation_manager/configuration_script_source.rb
Show resolved
Hide resolved
5d43862
to
aab48aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small q
manager = ManageIQ::Providers::Workflows::AutomationManager.in_my_region.first | ||
return if manager.nil? | ||
|
||
manager.configuration_script_sources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the .tap? I assume you used it to return the seeded record but I thought we didn't care about the return value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's true, it was returning the seeded repository previously but we don't need to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
c6f353a
to
ea8bd2d
Compare
Checked commits agrare/manageiq-providers-workflows@5cd43ef~...ea8bd2d with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
This PR has been effectively backported to |
Seed workflows from plugins'
content/workflows/**/*.asl
Depends on: