Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrew Lyons
pipeline
Commits
11f99902
Commit
11f99902
authored
Dec 15, 2017
by
Andrew Nicols
Browse files
runTask: Detect Moodle version
parent
a6ba511f
Changes
1
Hide whitespace changes
Inline
Side-by-side
vars/runTask.groovy
View file @
11f99902
...
...
@@ -8,8 +8,10 @@ def call(String task, String branch, String repo, String phpversion, String data
PHP_VERSION
=
"${phpversion}"
DBTYPE
=
"${database}"
TASK
=
"${task}"
PATHTORUNNER
=
"${HOME}/scripts/runner"
}
stages
{
stage
(
"Git Checkout"
)
{
steps
{
...
...
@@ -46,9 +48,19 @@ def call(String task, String branch, String repo, String phpversion, String data
}
}
stage
(
"Detect Moodle Version"
)
{
steps
{
moodleversion
=
sh
grep
'$branch'
moodle
/version.php | sed "s/
^[^
']*'
\
([^
'
]*
\
).*
$/\1/"
runner = "${env.PATHTORUNNER}/$
{
moodleversion
}
"
if
(!
fileExists
(
runner
))
{
runner
"${env.PATHTORUNNER}/master"
}
}
}
stage
(
"Run Task"
)
{
steps
{
sh
'$HOME/scripts/runner/master
/run.sh
'
sh
"${pathtorunner}
/run.sh
"
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment