[#151] Clone moodle before apply core patches#153
Merged
Conversation
Contributor
|
Thanks Matt, LGTM, it's a shame we need to disable the repo validation but that's all we can do until HQ changes 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.
Closes #151
Issue
Core patches need to be in the codebase before moodle install occurs.
There is a bit of a chicken and egg problem here since moodle plugin ci installs both moodle and the plugin at the same time, leaving no option for changes or core patches.
moodle-plugin-cialso only accepts git clone and not a local folder.Fix
I've updated it clones to a temporary directory and applies patches ontop of that.
Then it uses a little known feature of git - file cloning, i.e.
git clone /my/local/repo moodleis perfectly valid.The only issue is this is currently broken as Moodle plugin ci (incorrectly) rejects file repo urls moodlehq/moodle-plugin-ci#306
So I have temporarily disabled this validation. At the end of the day its just validation, so I don't see much issue with turning it off in our specific case :)
It's definitely a hack but considering this issue has been open in upstream ci for 1.5 yrs now I don't want to wait on them.
Testing
I tested this using catalyst/moodle-tool_emailutils#104 which is temporarily pointing to this branch. Once this is merged, i'll switch it back to the
mainbranch