Hi all,
I'm going to use GitLab CI to build and test my maya plugin project. Here is the detail of my system:
My project locates at the directory e:\dev\myproject on my local machine.
I set a environment variable MAYA_MODULE_PATH=e:\dev\myproject\moduls
The module file is e:\dev\myproject\moduls\plugin0.mod, its content is:
+ MAYAVERSION:2016 PLATFORM:win64 plugin0 any e:\dev\myproject\plugin0
...
The plugins project will be located at a different directory on each GitLab Runner machine.
For example, on Runner0 the directory COULD BE c:\GitLab-Runner\builds\00000000\group0\myproject, and on Runner1 the direcory COULD BE c:\GitLab-Runner\builds\11111111\group0\myproject.
The problem is that I can't find a convinent way to let Maya load the plugins on each Runner machine. Here are some ideas in my mind, but I'm not satisfied with them. Could you give any suggestion?
Idea1:
On each Runner, set environment variable MAYA_MODULE_PATH= c:\moduls
On Runner0, modify the content of file c:\moduls\plugin0.mod to
+ MAYAVERSION:2016 PLATFORM:win64 plugin0 any c:\GitLab-Runner\builds\00000000\group0\myproject\plugin0
...
On Runner1, modify the content of file c:\moduls\plugin0.mod to
+ MAYAVERSION:2016 PLATFORM:win64 plugin0 any c:\GitLab-Runner\builds\11111111\group0\myproject\plugin0
...
If I add another Runner2, I have to modify c:\moduls\plugin0.mod on Runner2 by hand, which is inconvient. + MAYAVERSION:2016 PLATFORM:win64 plugin0 any c:\GitLab-Runner\builds\22222222\group0\myproject\plugin0
...
Idea2:
On each Runner, set environment variable MAYA_MODULE_PATH= c:\moduls
Modify the content of file c:\moduls\plugin0.mod to
+ MAYAVERSION:2016 PLATFORM:win64 plugin0 any $(ProjectRoot)\plugin0
...
On Runner0, set an environment variable ProjectRoot= c:\GitLab-Runner\builds\00000000\group0\myproject
On Runner1, set an environment variable ProjectRoot= c:\GitLab-Runner\builds\11111111\group0\myproject
If I add another Runner2, I only have to set environment variable MAYA_MODULE_PATH= c:\moduls and ProjectRoot= c:\GitLab-Runner\builds\22222222\group0\myproject
But, it seems that Maya mod file can't parse environment variable at all.
Cheers
Yao