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

Hooks for Advanced Skripting #41

Closed
schrieveslaach opened this issue Apr 23, 2020 · 1 comment · Fixed by #70
Closed

Hooks for Advanced Skripting #41

schrieveslaach opened this issue Apr 23, 2020 · 1 comment · Fixed by #70
Labels
enhancement New feature or request

Comments

@schrieveslaach
Copy link
Contributor

This issue is currently just an idea.

Users of PREvant want to extend configurations of services dynamically. This custom configuration might be based on some team-specific development processes and potentially on some state that needs to be persisted.

Therefore, PREvant could make use of the scripting engine rhai:

In the configuration PREvant could offer a hooks section:

[hooks.preDeployment]
script = '/path/to/preDeployment.rhai'
stateful = true

[hooks.postDeletion]
script = '/path/to/postDeletion.rhai'
stateful = true

Based on this example PREvant would execute /path/to/preDeployment.rhai with app name, service configurations, state, etc. and the script could modify, fitler, the service configurtions and state, before the actual deployment happens.

This could replace the secrets eventually.

@schrieveslaach schrieveslaach added the enhancement New feature or request label Apr 23, 2020
@schrieveslaach
Copy link
Contributor Author

I'm rethinking this approach of using rhai and use a more common scripting language such as Javascript. So boa could be an option as well.

Further, I don't like the idea of stateful = true anymore. This could become an security issue in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant