-
Notifications
You must be signed in to change notification settings - Fork 53
Typical workflows
Frédéric Massart edited this page Mar 7, 2025
·
2 revisions
Here are some typical workflows. Keep in mind that any command followed by --help will give you more information on what can be done with it.
mdk create --version 26 --install --engine pgsql --run dev
-
create --version 26will clone a new instance of the latest Moodle 2.6 -
--installwill run the installation script -
--engine pgsqltells the installer to use PostgreSQL as the DB engine (does not work without --install) -
--run devwill execute the scriptdevafter installing the instance
mdk fix 12345
... commit your work ...
mdk push --update-tracker
-
fixcreates a branch from the latest stable version -
push --update-trackerpushes the branch to github, and updates the tracker issue
... from the branch you want to backport ...
mdk backport --versions 25 26 --push --update-tracker
- Backports the patch to the
versions2.5 and 2.6 -
--pushpushes the branch to github -
--update-trackerupdates the tracker issue
mdk update --all --upgrade
-
updatewill checkout the stable branch (master,MOODLE_26_STABLE, ...) -
--allspecifies to work on all the instances -
--upgradewill also run the upgrade process after a successful update
mdk purge
- Purges the cache
mdk uninstall
mdk install
-
uninstallwill drop the database and the content of dataroot -
installruns the installer with the default settings
mdk run dev
- Runs the script
devwhich sets up most settings developers are interested in
mdk run users
- Runs the script
userswhich creates some potential students, teachers and managers (s1 to s10, t1 to t3, and m1 to m3)
mdk run enrol
- Runs the script
enrolwhich enrols, in all courses, the users starting with ansas students, atas teachers andmas managers
mdk pull --testing 12345
- Creates a branch named MDL-12345-master-test from the latest stable
- Pulls the patch from the tracker issue MDL-12345
mdk phpunit --run
-
phpunitsets up various settings and installs PHPUnit fromcomposer -
--runwill run the entire test suite
mdk behat --run
-
behatsets up various settings and installs Behat fromcomposer -
--runwill run the entire test suite