繁体   English   中英

使用Windows Runner上载工件

[英]Upload artifacts with the Windows Runner

我们使用Gitlab-ci的官方Windows运行程序。 我们想上传文物。

我们在yaml文件中使用'artifact'关键字来定义需要上传的人工制品。 当我们提交时,这是我们得到的信息:

gitlab-ci-multi-runner 0.7.2 (998cf5d)
WARNING: artifacts is not supported by selected executor and shell
Using Shell executor...

这是因为它使用的是Windows机器吗? 这是什么交易?

目前不支持从Windows shell cmdpowershell上载工件。 经过一段时间的挖掘,我发现根据gitlab-ci-multi-runner \\ shells \\ bash.go bash确实支持它。

我的工作解决方案是:

  1. 安装Bash(已包含在Git-SCM中)
  2. 将bash目录( C:\\Program Files (x86)\\Git\\bin )添加到PATH
  3. 如果在cmd键入bash ,请确保bash启动
  4. 找到你的config.toml并修改/添加:

     executor = "shell" shell = "bash" 
  5. 重启你的git-runner服务

  6. 确保您的构建脚本采用bash语法
    (例如,使用cmd.exe /c "dir"从bash运行windows命令)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM