GitLab-Runner安装及使用
Git_Lab CI Setting
根据该教程本地下载并安装 gitlab-runner.exe
在GitLab远程仓库页面点击 setting-> CI/CD ->runner Expand ,然后拷贝 Runner setup URL , registration token到第三步输入
install gitlab-runner.exe and register on local PC
# at the git runner folder
gitlab-runner.exe install
gitlab-runner.exe register
...enter Runner setup URL
...enter registration token
...enter runner description
...enter runner tag (Unique Identification)
...enter script executor(depend on script language)
## automatically generate config.toml after success修改runner中对应的config.toml
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = " PC_1"
url = "https://gitlab.test.com/"
token = "test123456789"
executor = "shell"
builds_dir = "E:\\GitLab-Runner\\builds"
cache_dir = "E:\\GitLab-Runner\\cache"
environment = ["SCE_PHYRE=E:\\GitLab-Runner\\builds\\test"] #设置runner无法读取的环境变量
shell = "powershell" # 配置gitlab-ci.yml script会使用的语言 runner为win系统时建议使用powershell
[runners.custom_build_dir]
enabled = true # 自定义runner本地存储代码的位置
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
在远程仓库根目录下创建t
gitlab-ci.yml文件
#ex:
compile:
script:
- cd /d "D:\test" # 执行runner命令,自定义
- echo test
tags:
- PC_1 # 选择“gitlab-runner.exe register”中设置的“runner tag”
variables:
GIT_CLEAN_FLAGS: -ffdx -e cache/ # 清空缓存
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PROJECT_NAME # 设置仓库下载地址
配置成功后在本地目录下启动runner
gitlab-runner.exe run --syslog # 不可关闭当前terminal
注:
修改config.toml、注册runner,需要关闭“gitlab-runner.exe run --syslog”(在当前终端Ctrl+C)
一个gitlab-runner.exe可注册多个项目的runner,但不能过多, 同一台主机可以存在多个gitlab-runner.exe(不同目录,仓库地址也不能冲突)
config.toml中的“\”需要使用“\\”
CMD
gitlab-runner.exe install
gitlab-runner.exe register
gitlab-runner.exe start
gitlab-runner.exe restart
gitlab-runner.exe stop
gitlab-runner.exe run --syslog
ssh-keygen -t rsa -C xxx@xxx.com.cn #
.gitlab-ci.yml (Git_lab Code)
# 定义 stages
stages:
- test
- compile
test:
stage: test
script:
- echo test
tags:
- PC_1 deploy:
stage: compile
script:
- cd /d "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE"
- devenv.com "E:\GitLab-Runner\builds\test\test.sln" /rebuild "Release|x64"
tags:
- PC_1
variables:
GIT_CLEAN_FLAGS: -ffdx -e cache/ # clear git code
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PROJECT_NAME # code dir
QA:
删除register
在gitlab->setting->ci->runner->expand 删除对应runner
删除runner本地config.toml文件的对应runner配置
GitLab-Runner安装及使用的更多相关文章
- Gitlab CI持续集成 - GitLab Runner 安装与注册
GitLab Runner安装 需要添加gitlab官方库: # For Debian/Ubuntu/Mint curl -L https://packages.gitlab.com/install/ ...
- gitlab runner安装与使用
今天来讲一下如何使用gitlab-runner 下载runner,根据自己对应服务器的型号自行选择下载: # Linux x86- sudo wget -O /usr/local/bin/gitlab ...
- docker-Gitlab、GitLab Runner安装
以下操作均在CentOs下操作 1.Gitlab install ① 启动gitlab docker run --detach \ --hostname 115.30.149.35 \ --publi ...
- [转] Gitlab 8.x runner安装与配置
[From]http://muchstudy.com/2018/07/13/Gitlab-8-x-runner%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE ...
- Ubuntu安装Gitlab Runner
第一步: 添加GitLab的官方存储库: curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runne ...
- 使用gitlab runner 进行CI(二):gitlab runner的安装与配置
参考 https://docs.gitlab.com/runner/install/index.html,可以选择与gitlab相同的版本. gitlab runner可以通过安装binary包或do ...
- gitlab一键安装 (转)
原文地址:http://www.2cto.com/os/201411/353292.html 0 简介bitnami和gitlab bitnami BitNami是一个开源项目,该项目产生的开源软件包 ...
- 超详细Gitlab Runner环境配置中文教程
配置GitlabRunner环境 GitLab Runner 是一个开源项目, 它用来运行你定制的任务(jobs)并把结果返回给 GitLab. GitLab Runner 配合GitLab CI(G ...
- 基础架构之Gitlab Runner
基础架构之Gitlab Runner也是常用的基础设施,我们接着GitLab操作,具体使用GitlabRunner,如果不熟悉可以见官方详细介绍https://docs.gitlab.com/runn ...
- gitlab一键安装 笔记
0 简单介绍bitnami和gitlab bitnami BitNami是一个开源项目,该项目产生的开源软件包安装 Web应用程序和解决方式堆栈.以及虚拟设备. bitnami主办Bitrock公司成 ...
随机推荐
- 字符编码,存储引擎及MySQL字段类型相关知识点
字符编码,存储引擎及MySQL字段类型相关知识点 一.字符编码 1.在终端输入\s,查看数据库的基本信息(当前用户,版本,编码,端口号) 2.默认的配置文件是my-default.ini 拷贝上述的文 ...
- MySQL数据库技术实战
MySQL数据库技术实战 一,安装mysql 很早之前就知道mysql提供了一套数据库样本(github地址),用于测试你的应用程序和数据库服务器. 今天分享下使用过程并将他发布到了码云,以便于同 ...
- RISC-V 平台移植 RTOS
ARM 上移植实时操作系统大家可能比较熟悉,且例程较多,对于 RISC-V 内核的 MCU,可能相对比较陌生.下面结合 WCH 的 CH32V103 和 CH32V307 两款芯片来详细说下针 ...
- uni-app + .NET 7实现微信小程序订阅消息推送
微信小程序的订阅消息是小程序的重要能力之一,为实现服务的闭环提供更优的体验.订阅消息我们应该经常见到,比如下单成功之后的服务通知,支付成功后的支付成功通知,都属于小程序的订阅消息. 本文只实现一次性订 ...
- vue学习笔记(一)---- vue指令(在vue中使用样式的方式)
认真学习,认真记录,每天都要有进步呀!!! 加油叭!!! 一.在vue中使用样式的方式: 1. 直接传递一个数组,注意: 这里的 class 需要使用 v-bind 做数据绑定 <style&g ...
- Pytest插件pytest-repeat重复执行
Pytest插件pytest-repeat重复执行 安装 pip install pytest-repeat doc https://pypi.org/project/pytest-repeat/ h ...
- 经典this指向问题
代码如下 function f1() { this.p = function(){ // 这里 this 跟的是p这个func,谁调用p,就跟谁 console.log(this); } return ...
- AIFF和AIFF-C音频交换文件格式的简单介绍
正文 AIFF,全称 Audio Interchange File Format,可简写为 Audio IFF 或 AIFF,是苹果公司推出的一种音频文件格式. AIFF-C,是 AIFF 的扩充,C ...
- 如何快速把导出的csv表格数据导入到SqlServer中
(不要建自增字段,否则会出现第一个字段数据进不去的情况) 1.打开csv表格 2.打开要导入的表,右键编辑前两百行 3.表格中CTRL+C 数据库中CTRL+V 搞定! ** ...
- Oracle 账户【2023/2/5最新】
下载Oracle产品一般都需要登录Oracle账户才可以下载,这里提供一个账户方便大家使用,觉得有用的希望能点个小小的赞! 账号:191049742@qq.com 密码:1234qwerASDF!@# ...