artifacts:name 通过name指令定义所创建的工件存档的名称。可以为每个档案使用唯一的名称。artifacts:name变量可以使用任何预定义变量。默认名称是artifacts,下载artifacts改为artifacts.zip。 使用当前作业的名称创建档案 job: artifacts: name:"$CI_JOB_NAME"paths:- binaries/ 使用内部分支或标记的名称(仅包括binaries目录...
image:#指定gitlab-runner镜像imagePullPolicy:#镜像拉取策略gitlabUrl:#gitlab地址runnerRegistrationToken:#gitlab-runner注册用到的tockenconcurrent:#设置同行运行的runner个数checkInterval:#定义检查gitlab新构建的频率rbac:#角色设置create:trueclusterWideAccess:truemetrics:#prometheus metrics数据暴露enabled:truerunners...
# gitlab-runner unregister --url http://gitlab.xxxx.com/ --token xxxxx# gitlab-runner unregister --name runner名称 使用名称注销,同名则删除第一个 # gitlab-runner unregister --all-runners 直接注销所有runner runner注册:进入到项目,选择settings,选择CICD,选择runner,进行项目runner注册(还有admin设置...
映射/var/run/docker.sock这个文件是为了让容器可以通过/var/run/docker.sock与Docker守护进程通信,管理其他Docker容器-v /srv/gitlab-runner/config:/etc/gitlab-runner是将runner的配置文件映射到宿主机/srv/gitlab-runner/config方便调整和查看配置 按照上面的顺序操作下来,如果顺利的话就会在gitlab项目的ci里面看...
ExecutorGitLabRunnerGitLabExecutorGitLabRunnerGitLabopt[registration]loop[job requesting and handling]POST /api/v4/runners with registration_tokenRegistered with runner_tokenPOST /api/v4/jobs/request with runner_tokenjob payload with job_tokenJob payloadclone sources with job_tokendownload artifacts with...
从GitLab 8.0 开始,GitLab CI 就已经集成在 GitLab 中,我们只要在项目中添加一个.gitlab-ci.yml文件,然后添加一个 Runner,即可进行持续集成。 而且随着 GitLab 的升级,GitLab CI 变得越来越强大,本文将介绍如何使用 GitLab CI 进行持续集成。 一些概念 ...
tags 是指定runner script 是执行的脚本 only 是执行的条件 artifacts 是生成的证书 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 stages: - build variables: HOST: "true" # 定义一个变量,用于存储主机地址 host: "0.0.0.0" build-cert: tags: - cert stage: build...
简介: GitlabCI学习笔记之五:GitLabRunner pipeline语法之artifacts dependencies artifacts 用于指定在作业成功或者失败时应附加到作业的文件或目录的列表。作业完成后,工件将被发送到GitLab,并可在GitLab UI中下载。 artifacts:paths 路径是相对于项目目录的,不能直接链接到项目目录之外。 将制品设置为target目录 ...
四、Gitlab-Runner配置 在项目根目录下新建 .gitlab.yml文件,加入如下内容: unit_test、compile和deploy_test是自定义的job名字,另外几点配置说明: cache: cache设置缓存文件,这里缓存node_module依赖包,提高job构建效率,定义在全局,对所有的job生效; stage: 设置build和deploy两个阶段; artifacts: 下载文件。定义...
4.3 参考上一小节新建一个 runner Enter an executor, 选择shell 标签填deploy 4.4 修改.gitlab-ci.yml build-job:stage:build tags:-build script:-pnpm install-npm run build cache:paths:-node_modules/artifacts:paths:-dist/deploy-job:stage:deploy ...