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

setup / teardown hooks #1206

Merged
merged 8 commits into from
Jul 10, 2023
Merged

setup / teardown hooks #1206

merged 8 commits into from
Jul 10, 2023

Conversation

artem888
Copy link
Contributor

@artem888 artem888 commented Jun 28, 2023

Proposed Changes

This PR implements two hooks that can be executed before and after each maestro flow, i.e. to execute some setup / teardown actions.

Example of how the API will look like:

# myFlow.yaml
appId: myId
onFlowStart:
          - runFlow: setup.yaml
	  - runScript: setup.js
	  - <any other command>
onFlowComplete:
	  - runFlow: teardown.yaml
	  - runScript: teardown.js
	  - <any other command>
---
- launchApp

Testing

  • tested with successful case (both onFlowStart and onFlowComplete executed)
  • tested that onFlowComplete is executed if main flow fails
  • tested with multiple commands under onFlowStart and onFlowComplete

successful case:

before_after_hooks.mp4

failed case:

before_after_hooks_failed.mp4

Sorry, something went wrong.

@artem888 artem888 self-assigned this Jun 28, 2023
@axelniklasson
Copy link
Contributor

@artem888 nice work on this 🙌

  • Can you prepare a documentation PR for the maestro docs?
  • Are there any changes required on Maestro Cloud for this to be supported?

@artem888
Copy link
Contributor Author

@artem888 nice work on this 🙌

  • Can you prepare a documentation PR for the maestro docs?
  • Are there any changes required on Maestro Cloud for this to be supported?
  1. preparing PR on gitbook, will be ready today
  2. only updating maestro artifacts should be sufficient

@artem888 artem888 merged commit 1a3ac87 into main Jul 10, 2023
@artem888 artem888 deleted the MOB-2198 branch July 10, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants