簡體   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