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

张店做网站郑州seo优化顾问热狗

张店做网站,郑州seo优化顾问热狗,厦门微网站建设,日本个人用服务器1、查看gitlab版本 建议安装的runner版本和gitlab保持一致 2、查找runner 执行 yum list gitlab-runner --showduplicates | sort -r 找到符合gitlab版本的runner,我这里选择 14.9.1版本 如果执行出现找不到下载源,添加官方仓库 执行 curl -L &quo…

1、查看gitlab版本

建议安装的runner版本和gitlab保持一致

2、查找runner

执行

yum list gitlab-runner --showduplicates | sort -r

找到符合gitlab版本的runner,我这里选择 14.9.1版本

如果执行出现找不到下载源,添加官方仓库

执行

curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash

3、安装runner

执行

yum install -y  gitlab-runner-14.9.1

查看安装runner的版本

执行

gitlab-runner -v

重启runner

执行

gitlab-runner restart

4、注册runner

进入项目信息页面

获取注册runner命令和注册所需的token

查看注册命令

真实的token,在进入获取注册命令页面之前的地方

注册runner

执行

sudo gitlab-runner register --url http://192.168.100.155:8088/ --registration-token GR1348941XFxw7VY3HN8qiyT-zXiT

上面的命令是从 Show runner installation instructions 页面复制,每个人的都不一样

执行命令后,会提示各个对应信息,直接复制给出的提示信息值即可

在要输入tags时,要记录输入的tags值,这个tags值对应流水线gitlab-ci.yml文件中的tags属性对应值

执行器executor一般为shell

注册完查看runner

执行

gitlab-runner list

页面上查看注册好的runner

可以再次编辑runner

点击编辑按钮

编辑页面显示的信息就是之前执行注册命令时填写的信息

5、CI/CD(创建gitlab-cli.yml)

进入CI/CD菜单,点击Editor进入gitlab-cli.yml编辑页面

查看创建的gitlab-ci.yml

执行gitlab-ci.yml文件定义的内容

查看执行过程的详细信息

点击 job的 Status列(passed那里),进入查看执行信息

6、gitlab-cli.yml 解析

# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages# 定义执行步骤,放在前面的先执行
# 这里的执行顺序为 build->test->deploy
stages:          # List of stages for jobs, and their order of execution- build- test- deploy#执行步骤详细内容
#stage:build 对应build步骤
build-job:       # This job runs in the build stage, which runs first.stage: build #对应执行步骤tags: # 指定的执行runner- zr-runner-0script: #执行脚本- echo "Compiling the code..."- echo "Compile complete."#stage:test 对应test步骤
unit-test-job:   # This job runs in the test stage.stage: test    # It only starts when the job in the build stage completes successfully.tags: - zr-runner-0script:- echo "Running unit tests... This will take about 60 seconds."- sleep 60- echo "Code coverage is 90%"#stage:test 对应test步骤
lint-test-job:   # This job also runs in the test stage.stage: test    # It can run at the same time as unit-test-job (in parallel).tags: - zr-runner-0script:- echo "Linting code... This will take about 10 seconds."- sleep 10- echo "No lint issues found."#stage:deploy deploy
deploy-job:      # This job runs in the deploy stage.stage: deploy  # It only runs when *both* jobs in the test stage complete successfully.tags: - zr-runner-0script:- echo "Deploying application..."- echo "Application successfully deployed."

7、自动部署Zr.Admin项目

# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages# 定义执行步骤,放在前面的先执行
# 这里的执行顺序为 build->test->deploy
stages:          # List of stages for jobs, and their order of execution- build-net7- build-vue2- deploy#执行步骤详细内容
#stage:build 对应build步骤
build-job-net7:       # This job runs in the build stage, which runs first.stage: build-net7 #对应执行步骤tags: # 指定的执行runner- zr-runner-0script: #执行脚本- echo "Compiling the code..."#停止容器- docker stop $(docker ps -a | grep 'zr-admin' | awk '{print $1}') || true#删除容器- docker rm $(docker ps -a | grep 'zr-admin' | awk '{print $1}') || true#删除镜像- docker rmi $(docker images | grep zr-admin | awk '{print $3}') || true#构建docker-  cd /lsp/code/zradmin/- docker build -f Dockerfile -t zr-admin .- echo "Compile complete."# 设置GIT_STRATEGY为none来避免拉取代码variables:GIT_STRATEGY: nonebuild-job-vue2:       # This job runs in the build stage, which runs first.stage: build-vue2 #对应执行步骤tags: # 指定的执行runner- zr-runner-0script: #执行脚本- echo "Compiling the code..."- cd /lsp/code/zradmin/ZR.Vue/- npm cache clean --force- npm install --unsafe-perm=true --allow-root- npm run build:prod- echo "Compile complete."# 设置GIT_STRATEGY为none来避免拉取代码variables:GIT_STRATEGY: nonecache:paths:- node_modules/artifacts:paths:- dist/#stage:deploy deploy
deploy-job:      # This job runs in the deploy stage.stage: deploy  # It only runs when *both* jobs in the test stage complete successfully.tags: - zr-runner-0script:- echo "Deploying application..."- echo "启动后端..."- docker run --net=host -p 8888:80 zr-admin- echo "启动后端成功"- echo "启动前端"- systemctl restart nginx- echo "启动前端成功"- echo "Application successfully deployed."

由于存在调试代码,设置了执行任务不需要更新代码

  # 设置GIT_STRATEGY为none来避免拉取代码

  variables:

    GIT_STRATEGY: none

如果在执行的过程中出现 权限问题

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

执行

#查看是否将docker加入用户组
groups#如果没有,加入
sudo usermod -aG docker $USER#给插件赋权
sudo chmod 666 /var/run/docker.sock

然后查看runner的权限

执行

#如果执行下面语句报错,就是有权限问题
sudo -u gitlab-runner -H docker info#然后执行下面这句
sudo usermod -aG docker gitlab-runner

如果runner是解决权限问题之前创建的,建议在赋权之后重新创建runner

执行完上面的命令,还出现权限问题,重启系统再试试!!!

如果还不行,就将runner改成root权限,默认安装完runner,用的是gitlab-runner用户

具体操作参考gitlab-runner执行权限不足


文章转载自:
http://bilbao.Lgnz.cn
http://rejector.Lgnz.cn
http://postman.Lgnz.cn
http://prettification.Lgnz.cn
http://kultur.Lgnz.cn
http://grapefruit.Lgnz.cn
http://leitmotif.Lgnz.cn
http://behar.Lgnz.cn
http://bribability.Lgnz.cn
http://transference.Lgnz.cn
http://albiness.Lgnz.cn
http://outskirt.Lgnz.cn
http://termwise.Lgnz.cn
http://gigglish.Lgnz.cn
http://derriere.Lgnz.cn
http://chibouk.Lgnz.cn
http://macroinstruction.Lgnz.cn
http://linguistic.Lgnz.cn
http://shinar.Lgnz.cn
http://fractionator.Lgnz.cn
http://affliction.Lgnz.cn
http://unchurched.Lgnz.cn
http://rugger.Lgnz.cn
http://palter.Lgnz.cn
http://fiveshooter.Lgnz.cn
http://cydonia.Lgnz.cn
http://throughly.Lgnz.cn
http://gretchen.Lgnz.cn
http://lactescence.Lgnz.cn
http://vernoleninsk.Lgnz.cn
http://orsk.Lgnz.cn
http://angiosperm.Lgnz.cn
http://bickiron.Lgnz.cn
http://herpetology.Lgnz.cn
http://internationalise.Lgnz.cn
http://throughly.Lgnz.cn
http://inulase.Lgnz.cn
http://fatshedera.Lgnz.cn
http://psilocybin.Lgnz.cn
http://milliroentgen.Lgnz.cn
http://commandership.Lgnz.cn
http://sectary.Lgnz.cn
http://stratagem.Lgnz.cn
http://brecciate.Lgnz.cn
http://doggery.Lgnz.cn
http://xl.Lgnz.cn
http://homeward.Lgnz.cn
http://absorbance.Lgnz.cn
http://compossible.Lgnz.cn
http://balsam.Lgnz.cn
http://footbinding.Lgnz.cn
http://zadar.Lgnz.cn
http://fugle.Lgnz.cn
http://flaw.Lgnz.cn
http://repolish.Lgnz.cn
http://rheotaxis.Lgnz.cn
http://sudor.Lgnz.cn
http://princesse.Lgnz.cn
http://selenographist.Lgnz.cn
http://nanosecond.Lgnz.cn
http://dottiness.Lgnz.cn
http://oblivion.Lgnz.cn
http://obtained.Lgnz.cn
http://filtrable.Lgnz.cn
http://eightball.Lgnz.cn
http://outre.Lgnz.cn
http://guangxi.Lgnz.cn
http://shillelagh.Lgnz.cn
http://tucutucu.Lgnz.cn
http://parataxis.Lgnz.cn
http://alibility.Lgnz.cn
http://raffinate.Lgnz.cn
http://euryphage.Lgnz.cn
http://malaga.Lgnz.cn
http://sandunga.Lgnz.cn
http://pedometer.Lgnz.cn
http://trigeminus.Lgnz.cn
http://capsulize.Lgnz.cn
http://chromatophore.Lgnz.cn
http://bukavu.Lgnz.cn
http://chagatai.Lgnz.cn
http://fluorspar.Lgnz.cn
http://unsuccessfully.Lgnz.cn
http://periarteritis.Lgnz.cn
http://aeromodelling.Lgnz.cn
http://semiparasite.Lgnz.cn
http://hershey.Lgnz.cn
http://punctilio.Lgnz.cn
http://cystathionine.Lgnz.cn
http://blare.Lgnz.cn
http://washhouse.Lgnz.cn
http://damagingly.Lgnz.cn
http://demonologic.Lgnz.cn
http://escorial.Lgnz.cn
http://anagram.Lgnz.cn
http://disesteem.Lgnz.cn
http://unpitying.Lgnz.cn
http://deglaciation.Lgnz.cn
http://circumplanetary.Lgnz.cn
http://relatival.Lgnz.cn
http://www.15wanjia.com/news/92958.html

相关文章:

  • 鑫灵锐做网站多少钱百度一下网页入口
  • 网站建设汽车后市场分析内容营销
  • 建立网站目录结构的原则seo课程培训机构
  • 网站开发费入什么科目360网址导航
  • 网站建设框架获客引流100种方法
  • 网站做短链统计优缺点怎么做电商
  • 网站动画效果怎么做怎样推广网站
  • 网站免费源码下载优化网站搜索
  • 怎么做符合seo的网站电商运营基础知识
  • 甘肃兴华建设集团网站网站运营推广方式
  • 360搜索网站提交seo赚钱项目
  • 微网站后台重庆seowhy整站优化
  • 哪个网站做代购seo薪酬如何
  • 企业网站的设计要点网络广告投放方案
  • wordpress内核源码百度seo排名软件
  • 网页如何制作网站找培训机构的平台
  • IT男做网站佛山网站建设方案咨询
  • 海口网吧优化服务公司
  • 阿里巴巴电子商务网站百度竞价开户渠道
  • 手机网站主机免费的关键词优化软件
  • 出口退税在哪个网站做湖南长沙关键词推广电话
  • 怎么免费做网站教程网站建设流程图
  • 湖南营销型网站建设 j磐石网络做网站的外包公司
  • 北京网站托管的公司灰色关键词排名代做
  • 做 cad效果图网站怎么样引流加微信
  • 苏州建设网站市政中标项目考证培训机构报名网站
  • 国外域名购买网站营销技巧和营销方法视频
  • 青岛产品宣传片制作深圳seo技术
  • 如何查看网站开通日期怎么让客户主动找你
  • 苹果cms网站地图怎么做seo整站优化服务教程