Using nested command substitution in jenkins pipeline sh step

后端 未结 1 1464
灰色年华
灰色年华 2021-01-19 02:35

I\'m trying to flatten a results directory prior to archiving using a symbolic link to the relevant inner folder that first traverses a bunch of variable path names determin

相关标签:
1条回答
  • 2021-01-19 03:16

    Couple of interesting strategies around this problem

    Decompose long sh scripts into distinct functional pieces with return values

    https://stackoverflow.com/a/47394132/1330381

    Escape nested shell commands with backslash \$,

    sh """
        \$(echo TEST this subshell \$(ls .))
    """
    

    https://stackoverflow.com/a/50356318/1330381

    0 讨论(0)
提交回复
热议问题