-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Authored-by: Jayson Grace <jayson.e.grace@gmail.com>
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# File Creation and Cleanup using `test-cleanup` Step | ||
|
||
Discover how to create and subsequently clean up files leveraging the | ||
`test-cleanup` step. This example showcases the capability to create a | ||
directory and remove it in the cleanup step. | ||
|
||
--- | ||
|
||
## Running `cleanup-step.yaml` Demonstration | ||
|
||
Execute the following command to illustrate the functionality of | ||
the `test-cleanup` step: | ||
|
||
```bash | ||
ttpforge run forgearmory//examples/steps/cleanup-step/cleanup-step.yaml | ||
``` | ||
|
||
--- | ||
|
||
## Expected Output | ||
|
||
```text | ||
INFO [*] Validating Steps | ||
INFO [+] Finished validating steps | ||
INFO [+] Running current TTP: test-cleanup | ||
INFO [+] Running current step: step_one | ||
INFO ========= Executing ========== | ||
# Directory "testDir" is created here | ||
INFO ========= Done ========== | ||
INFO [+] Finished running step: step_one | ||
INFO [*] Completed TTP | ||
INFO [*] Starting Cleanup | ||
INFO ========= Executing ========== | ||
# Directory "testDir" is removed here | ||
INFO ========= Done ========== | ||
INFO [*] Cleanup Complete | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: test-cleanup | ||
steps: | ||
- name: step_one | ||
inline: mkdir testDir | ||
cleanup: | ||
inline: rm -rf testDir |