refactor: replace bash assertion with Kotlin logic step in bindings server workflow#2335
Closed
krzema12 wants to merge 7 commits into
Closed
refactor: replace bash assertion with Kotlin logic step in bindings server workflow#2335krzema12 wants to merge 7 commits into
krzema12 wants to merge 7 commits into
Conversation
…erver workflow Replace the bash-based failsWithPhraseInLogs approach with a Kotlin logic step using ProcessBuilder for running scripts and asserting on exit codes and error messages inline in Kotlin.
4389354 to
03d1222
Compare
03d1222 to
0c417f0
Compare
46a8769 to
c6fd9bf
Compare
c6fd9bf to
b98bfb4
Compare
Kotlin 2.0.0 doesn't support -script flag, and the kotlin command needs a .kts extension to recognize a file as a script. Write the inline Kotlin code to /tmp/script.kts via bash heredoc first, then run kotlin on it.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the bash-based
failsWithPhraseInLogsapproach with a Kotlin logic step usingProcessBuilderfor running scripts and asserting on exit codes and error messages inline in Kotlin, eliminating the bash indirection.