当前位置: 首页 > wzjs >正文

深圳做网站广告联盟官网入口

深圳做网站,广告联盟官网入口,app开发 网站建设,中国建设银行安徽省分行招聘网站Gitlab Runner GitLab Runner是一个用于运行GitLab CI/CD流水线作业的软件包,由GitLab官方开发,完全开源。你可以在很多主流的系统环境或平台上安装它,如Linux、macOS、Windows和Kubernetes。如果你熟悉Jenkins 的话,你可以把它…

Gitlab Runner 

GitLab Runner是一个用于运行GitLab CI/CD流水线作业的软件包,由GitLab官方开发,完全开源。你可以在很多主流的系统环境或平台上安装它,如Linux、macOS、Windows和Kubernetes。如果你熟悉Jenkins 的话,你可以把它理解为Jenkins slave节点。

Gitlab Runner 架构

图片

安装GitLab Runner

没有GitLab Runner,GitLab CI/CD的流水线就无法运行,现在我们就在一台计算机上安装GitLab Runner。GitLab Runner的安装方式有很多,二进制安装,docker安装。今天我介绍一下二进制安装。

1. 下载安装包

sudo curl -L --output /usr/local/bin/gitlab-runner "https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/latest/binaries/gitlab-runner-linux-amd64"

图片

2. 添加执行权限

#sudo chmod +x /usr/local/bin/gitlab-runner

3. 创建 GitLab CI 用户

#useradd --comment 'Gitlab runner' --create-home gitlab-runner --shell /bin/bash

4.  作为服务安装

sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runnersudo gitlab-runner start

5. 注册到Gitlab 服务器

当然你如果有自己的gitlab 服务器的话,也可以注册到自己的gitlab 服务器。

gitlab-runner registerRuntime platform                                    arch=amd64 os=linux pid=47871 revision=44feccdf versionRunning in system-mode.                                                                               Enter the GitLab instance URL (for example, https://gitlab.com/):https://gitlab.comEnter the registration token:xxxxxxxxxxxxxxxx  //请替换成自己的token Enter a description for the runner:[gitlab01]: linuxEnter tags for the runner (comma-separated):linuxEnter optional maintenance note for the runner:This is only for testing.WARNING: Support for registration tokens and runner parameters in the 'register' command has been deprecatert for authentication tokens. For more information, see https://docs.gitlab.com/ee/ci/runners/new_creation_Registering runner... succeeded                     runner=GR134894157Z-kVdL            Enter an executor: instance, custom, ssh, parallels, docker-windows, docker+machine, shell, virtualbox, doc[shddd]: dockerEnter the default Docker image (for example, ruby:2.7):alpine:latestRunner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml"

通过下面的步骤可以查看token

图片

注册成功后,可以登录gitlab.com来查看该runner

图片

运行pipeline

在你的project 中创建一个.gitlab-ci.yml文件

图片

复制下面的代码并提交更改,然后pipeline开始工作。

build-job:  stage: build  script:    - echo "Hello, $GITLAB_USER_LOGIN!"
test-job1:  stage: test  script:    - echo "This job tests something"
test-job2:  stage: test  script:    - echo "This job tests something, but takes more time than test-job1."    - echo "After the echo commands complete, it runs the sleep command for 20 seconds"    - echo "which simulates a test that runs 20 seconds longer than test-job1"    - sleep 20
deploy-prod:  stage: deploy  script:    - echo "This job deploys something from the $CI_COMMIT_BRANCH branch."  environment: production

选择Build-Pipelines,你可以看到三个阶段的pipepline:

图片

图片

点击pipeline id,可以看到图形化的pipeline。

图片

选择其中的一个job,点击该job名称可以看到job的详细信息。

图片

到此为止,你已经在gitlab 中成功运行第一个CICD pipeline。

总结

今天我们了解的 Gitlab CI/CD 中负责执行脚本的 Gitlab Runner 的设计结构,介绍了它的安装(二进制),注册流程。最后我们演示了如何运行一个 CICD pipeline。

http://www.dtcms.com/wzjs/227583.html

相关文章:

  • 长沙房地产信息网官网旅游企业seo官网分析报告
  • 宝鸡做网站哪家公司好沧州百度推广公司
  • 深圳网站建设开发哪家好免费关键词挖掘工具
  • 微信登录建设银行网站网络营销公司
  • 基于网站优化的搜索引擎推广方法大型的营销型网站
  • 长沙网站搭建首选智投未来网络营销公司注册找哪家
  • 柳州网站制作公司百度搜索引擎的原理
  • 韶关网站建设价格搜索引擎优化的英语简称
  • 做黄图网站接广告好赚吗搜索引擎网站优化推广
  • 做网站网络电商平台推广公司
  • 网站不备案可以用吗山东济南最新事件
  • 怎么做干果网站廊坊关键词排名首页
  • 面包屑网站导航怎么做鸿科经纬教网店运营推广
  • 怎样做网站排名手机搭建网站
  • 怎么给网站做防护佛山网站快速排名提升
  • 政府门户html网站模板网站免费软件
  • 查询公司郑州seo顾问外包公司
  • yii2框架做的网站有哪些站长之家下载
  • 2017自己做网站的趋势信阳网络推广公司
  • 网盘搜索网站怎么做条友网
  • wordpress textarea福州百度seo排名
  • 程序开发的基本步骤是什么关键词优化排名工具
  • 集团制度建设网站网页设计与制作期末作品
  • Java建设的网站有哪些脱发严重是什么原因引起的
  • java营销网站建设admin5站长网
  • 网站建设宣传图psseo自然排名关键词来源的优缺点
  • 在网站底部做超链接的操作步骤数字营销服务商seo
  • 淄博网站建设相关文章做一个网站的步骤
  • 搜狗站群系统广州优化疫情防控举措
  • 江苏城乡建设学校网站软件开发工具