-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comprehensively Refactor Step Structure (#382)
* Simplify step creation by refactoring shared code and streamline unmarshalling * Use the simplified setup to add new step types print_str and remove_path
- Loading branch information
Showing
36 changed files
with
1,354 additions
and
1,714 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
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
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
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
30 changes: 30 additions & 0 deletions
30
cmd/test-resources/repos/another-repo/some-ttps/cleanup-tests/stress-tests.yaml
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,30 @@ | ||
--- | ||
name: cleanup-stress-test | ||
description: | | ||
Cleanup a whole bunch of different ways | ||
steps: | ||
- name: file-step-with-inline-cleanup | ||
file: test.sh | ||
args: | ||
- execute_step_1 | ||
cleanup: | ||
inline: | | ||
echo "cleanup_step_1" | ||
- name: print-with-file-cleanup | ||
print_str: execute_step_2 | ||
cleanup: | ||
file: test.sh | ||
args: | ||
- cleanup_step_2 | ||
- name: ttp-with-print-cleanup | ||
ttp: cleanup-tests/subttp/ttp.yaml | ||
args: | ||
to_print: execute_step_3 | ||
cleanup: | ||
print_str: cleanup_step_3 | ||
- name: inline-with-ttp-cleanup | ||
inline: echo execute_step_4 | ||
cleanup: | ||
ttp: cleanup-tests/subttp/ttp.yaml | ||
args: | ||
to_print: cleanup_step_4 |
7 changes: 7 additions & 0 deletions
7
cmd/test-resources/repos/another-repo/some-ttps/cleanup-tests/subttp/ttp.yaml
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: print-stuff | ||
args: | ||
- name: to_print | ||
steps: | ||
- name: print-arg | ||
print_str: {{.Args.to_print}} |
2 changes: 2 additions & 0 deletions
2
cmd/test-resources/repos/another-repo/some-ttps/cleanup-tests/test.sh
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,2 @@ | ||
#!/bin/bash | ||
echo "$1" |
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
11 changes: 11 additions & 0 deletions
11
cmd/test-resources/repos/another-repo/some-ttps/sub-ttp-example/subttp1.yaml
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,11 @@ | ||
--- | ||
name: subttp1 | ||
steps: | ||
- name: subttp1_step_1 | ||
inline: echo subttp1_step_1 | ||
cleanup: | ||
inline: echo subttp1_step_1_cleanup | ||
- name: subttp1_step_2 | ||
inline: echo subttp1_step_2 | ||
cleanup: | ||
inline: echo subttp1_step_2_cleanup |
11 changes: 11 additions & 0 deletions
11
cmd/test-resources/repos/another-repo/some-ttps/sub-ttp-example/subttp2.yaml
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,11 @@ | ||
--- | ||
name: subttp2 | ||
steps: | ||
- name: subttp2_step_1 | ||
inline: echo subttp2_step_1 | ||
cleanup: | ||
inline: echo subttp2_step_1_cleanup | ||
- name: intentional_failure | ||
inline: foobarbaz | ||
cleanup: | ||
inline: echo subttp2_step_2_cleanup |
7 changes: 7 additions & 0 deletions
7
cmd/test-resources/repos/another-repo/some-ttps/sub-ttp-example/ttp.yaml
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: subttp_cleanup_test | ||
steps: | ||
- name: first_sub_ttp | ||
ttp: sub-ttp-example/subttp1.yaml | ||
- name: second_sub_ttp | ||
ttp: sub-ttp-example/subttp2.yaml |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.