我试图在Windows 10机器上设置GitLab运行程序来构建私有项目。
当脚本涉及到与python相关的命令或具有类似输出的minGW32 32-make时,构建失败:
Running with gitlab-runner 15.2.1 (32fc1585)
on NewBuildServer GhcDD9Gz
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:01
Running on RND_SBORKA2NEW...
DEPRECATION: CMD shell is deprecated and will no longer be supported
Getting source from Git repository
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in C:/GitLab-Runner/builds/GhcDD9Gz/0/shirobokov/ramenkap_test_runners/.git/
Checking out c814ddda as master...
Updating/initializing submodules recursively with git depth set to 50...
Executing "step_script" stage of the job script
00:00
$ echo "Build begin"
"Build begin"
$ cd project
$ python tools/prebuild.py settings.mak
"python" �� ����� ����७��� ��� ���譥�
��������, �ᯮ��塞�� �ணࠬ��� ��� �������� 䠩���.
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 9009
同时,在当地,该项目的组装没有问题。mingw32和python被添加到PATH。如何解决输出不正确的问题:
"python" �� ����� ����७��� ��� ���譥�
��������, �ᯮ��塞�� �ணࠬ��� ��� �������� 䠩���.
在GitLab运行程序设置中,"cmd“被选中为"executor”。在本地和在GitLab中执行相同的命令有什么区别?
[[runners]]
name = "NewBuildServer"
url = "https://XXXXX.YY.ZZ/"
token = "GhcDD9GzDypuJxLJgBLq"
executor = "shell"
shell = "cmd"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
发布于 2022-08-24 12:35:06
解决这个问题的方法如下:在GitLab运行服务器上构建成功,因为路径变量是为当前用户注册的(用户变量用于)。
GitLab使用未在安装GitLab运行程序的服务器上注册的“系统变量”。
必须向“系统变量”添加所有必要的路径。
https://stackoverflow.com/questions/73442104
复制相似问题