擅长:python、mysql、java
<p>我希望它仍然相关,但您可以使用Chocolate在gitlab windows runners创建的虚拟机上安装python,如下一个.gitlab-ci.yml示例:</p>
<pre><code>.shared_windows_runners:
tags:
- shared-windows
- windows
- windows-1809
before_script:
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
- echo ${time}
- echo "started by ${GITLAB_USER_NAME}"
- choco install python version=3.7.0 -y -f
stages:
- build
build_somthing:
extends:
- .shared_windows_runners
stage: build
script:
- "C:\\Python37\\python.exe -m pip install upgrade setuptools"
- "C:\\Python37\\python.exe -m pip install -r requirements.txt"
</code></pre>
<p>Chocolate将在路径C:\Python37中安装python,因此如果您想使用python,可以按如下方式使用它:“C:\Python37\python.exe-m pip安装升级设置工具”</p>