Gitlab CI/CD - Command Line Build Project - PowerShell Windows

Hi, friends
I want to build a cocos creator project by command line after pushing into the GitLab repo.

I have this Powershell script:


$buildParams = "platform=web-mobile;"
$buildParams += "debug=true;"

Start-Process -FilePath "G:\cocos-engines\2.4.3\CocosCreator.exe" -ArgumentList "--nologin --path $projectPath --build $buildParams" -PassThru -Wait -NoNewWindow

I run this script on Windows PowerShell ISE is OK.and build project successfully.

But when GitLab-runner runs this script. Build not complete and three processes of cocos opened and stay this step.

What’s wrong?

You might want to check the omissions that gitlabrunner has vs what permissions the user you are running from has. I’ve never done this way of build but it could be due to the security restrictions placed in Git lab runner

1 Like

Thanks for the reply. Yes, I guess the problem is with the gitlab-runner access level. I installed gitlab-runner with a Windows user account but the problem was not solved. This account also has admin access.