Commit c5e5dd1c authored by Andrew Nicols's avatar Andrew Nicols

runTask: Collect output using sh()

parent 4ad79748
...@@ -50,7 +50,11 @@ def call(String task, String branch, String repo, String phpversion, String data ...@@ -50,7 +50,11 @@ def call(String task, String branch, String repo, String phpversion, String data
stage("Detect Moodle Version") { stage("Detect Moodle Version") {
steps { steps {
moodleversion = sh grep "\$branch" moodle/version.php | sed "s/^[^']*'\\([^']*\\).*\$/\\1/" moodleversion = sh (
script: 'grep "\$branch" moodle/version.php | sed
"s/^[^']*'\\([^']*\\).*\$/\\1/"',
returnStdout: true
).trim()
runner = "${env.PATHTORUNNER}/${moodleversion}" runner = "${env.PATHTORUNNER}/${moodleversion}"
if (!fileExists(runner)) { if (!fileExists(runner)) {
runner "${env.PATHTORUNNER}/master" runner "${env.PATHTORUNNER}/master"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment