我正在学习CI/CD,目的是优化开发。
在工作中,我们使用Windows 11机器,我们有自己的Gitlab服务器(我们不使用公共Gitlab)。
下载Gitlab runner后,我已经按照Gitlab Repository -> Settings -> CI/CD -> Runners下提供的简单说明启动了运行器
我的runner配置:
[[runners]]
name = "Runner for ESP32 test application"
url = "https://xxx.xxx.xxxxxxxx.lt/"
id = 5
token = "xxxxxxxxxxxxxxxxxxx"
token_obtained_at = 2023-12-11T09:30:58Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "shell"
shell = "pwsh"
[runners.cache]
MaxUploadedArchiveSize = 0
字符串
在我创建了一个runner之后,我创建了一个.gitlab-ci.yml文件:
stages: # List of stages for jobs, and their order of execution
- release
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG # Run this job when a tag is created
script:
- echo "running release_job"
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
tag_name: '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG'
型
1条答案
按热度按时间lymgl2op1#
正在使用Shell(JavaScript)执行器.
你使用的是shell executor,而且是在Windows上。管道是为docker容器
registry.gitlab.com/gitlab-org/release-cli:latest
编写的。使用docker executor。