如何在 .gitlab-ci.yml 中指定要使用的 docker 镜像
以下 .gitlab-ci.yml 将使用 cmake 和自定义 docker 镜像构建本机可执行项目:
gitlab-ci.yml
stages:
- build
buildmyexe:
stage: build
image: 'ulikoehler/ubuntu-gcc-cmake:latest'
script:
- cmake .
- make -j4在此示例中,我们只有一个阶段 - 如果你有多个阶段,你可以为每个阶段指定不同的镜像。
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow