[英]Upload artifacts with the Windows Runner
We use a official Windows runner from Gitlab-ci. 我们使用Gitlab-ci的官方Windows运行程序。 We want to upload artifacts.
我们想上传文物。
We use the 'artifact' keyword in our yaml file to define the artefacts that need to be uploaded. 我们在yaml文件中使用'artifact'关键字来定义需要上传的人工制品。 When we commit this is the message we are getting:
当我们提交时,这是我们得到的信息:
gitlab-ci-multi-runner 0.7.2 (998cf5d)
WARNING: artifacts is not supported by selected executor and shell
Using Shell executor...
So is this because it is using a Windows machine? 这是因为它使用的是Windows机器吗? What is the deal here?
这是什么交易?
Uploading artifacts from the windows shells cmd
and powershell
are currently not supported. 目前不支持从Windows shell
cmd
和powershell
上载工件。 After a while of digging the source I found that according to gitlab-ci-multi-runner\\shells\\bash.go bash
does support it. 经过一段时间的挖掘,我发现根据gitlab-ci-multi-runner \\ shells \\ bash.go
bash
确实支持它。
The working solution for me is: 我的工作解决方案是:
C:\\Program Files (x86)\\Git\\bin
) to your PATH
C:\\Program Files (x86)\\Git\\bin
)添加到PATH
bash
in the cmd
cmd
键入bash
,请确保bash启动 find your config.toml and modify/add: 找到你的config.toml并修改/添加:
executor = "shell" shell = "bash"
restart your git-runner service 重启你的git-runner服务
cmd.exe /c "dir"
) cmd.exe /c "dir"
从bash运行windows命令)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.