-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add pre workflow custom hooks to run scripts before workflow execution(plan, apply, etc) #1255
Conversation
36cf6fb
to
bdce9c5
Compare
Codecov Report
@@ Coverage Diff @@
## master #1255 +/- ##
==========================================
+ Coverage 69.98% 70.05% +0.06%
==========================================
Files 71 74 +3
Lines 5414 5540 +126
==========================================
+ Hits 3789 3881 +92
- Misses 1275 1303 +28
- Partials 350 356 +6
Continue to review full report at Codecov.
|
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.
LGTM 💯
Thanks for approvals! I will add some |
how is it going ? is this PR ready for merge ? |
@nishkrishnan @chenrui333 I update the |
If you rebase, the failed test will probably resolve |
3a5df6f
to
9f3dcec
Compare
9f3dcec
to
795d350
Compare
Implements: #500
This PR implement functionality to run user defined scripts before any workflow is executed, the feature is based on discussion in [Feature request] Dynamically generate repo atlantis.yaml config.
Based on a comment added
pre_workflow_hooks
to server's repo config. Custom scripts can be declared as follows:To run the scripts I implemented a new
PreWorkflowHooksCommandRunner
interface, the interface will manage execution life cycle similar to howCommandRunner
works, the difference is that it does not update PR with the outcome of the execution. ThePreWorkflowHooksCommandRunner
is triggered when PR is created or updated and runs before theautoplan
. IfPreWorkflowHooksCommandRunner
fails during execution it will log the error but will not update the PR or stopautoplan
from running.I haven't updated the documentation but wanted to get the changes out to get some eyes on the PR.