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

Have st2 pack install checkout git submodules when cloning a pack repo #5814

Open
jk464 opened this issue Nov 23, 2022 · 3 comments
Open

Have st2 pack install checkout git submodules when cloning a pack repo #5814

jk464 opened this issue Nov 23, 2022 · 3 comments

Comments

@jk464
Copy link
Contributor

jk464 commented Nov 23, 2022

When a Pack is installed on Stackstorm using pack install - stackstorm performs a clone on the Repo (Code) - however this results in any submodules present in the repo not being checked out and only being an empty directory.

It would be useful if the clone_repo function also checked out any submodules that are present in the repo, as it would be helpful to add dependencies maintained in seperate repos to the pack as a submodule, while still being maintained externally.

In my use case a series of ansible playbooks are maintained in a seperate repo and I would like to also make them available as a pack to st2, and as I see it the best way to do that is via git submodules.

@arm4b
Copy link
Member

arm4b commented Nov 23, 2022

Thanks for the feature request. It would be a helpful addition.

This sounds like a good first issue if someone is willing to contribute the enhancement.

@jamesdreid
Copy link

I know it is does not address the feature enhancement directly, but this function can be addressed with a workflow and rule that is triggered whenever the pack is loaded. The workflow task would look something like:
image

Then add a rule to the pack that will run this workflow any time the pack is installed and/or expose the workflow as an alias and allow it to be run directly via Chat if the sub-module needs updating outside of the pack install.

@jk464
Copy link
Contributor Author

jk464 commented Jun 19, 2023

Hi I've open a PR that implements this - could someone review this PR? Thanks :)

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

No branches or pull requests

3 participants