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

docs: add example about multi-line commands #792

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs: add example about multi-line commands
nicolasfara committed Nov 13, 2024

Verified

This commit was signed with the committer’s verified signature.
JasonvanBrackel Jason L. van Brackel
commit 6ce9932be9dc424f988e162c3d3c1c0b91d4df9c
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,20 @@ The workflow is the following:
0. Force kill remaining daemons
0. Cleanup the Gradle cache

## ⚠️ Multi-line commands

When using multi-line commands, note that if no proper command concatenation is performed, only the last command exit code will be considered when evaluating if a retry should be performed.
It is strongly suggested to concatenate with `&&` multiple commands:

```yaml
with:
build-command: |
./gradlew assemble --parallel &&
./gradlew --stop
```

In this way, if a command along the command chain fails, the entire block of commands fails as well.

## Example

In the following examples, all values but secrets are set to their default. If you are fine with the default value, just omit the parameter.