gitlab

Understanding Gitlab CI tags

六月ゝ 毕业季﹏ 提交于 2020-04-08 00:58:07
问题 I've read documentation, some articles and you might call me dumb, but this is my first time working with a concept like this. I've registered runner with tag "testing" created tag "testing" in gitlab binded this runner, with particular project I've also added the same tag e.g. "testing"in my local repo. BUT how exactly is running my jobs dependent on those tags? Are all these operations necessary? If I push new code to repo, *.yml file is executed anyway as far as I tested. So what if I want

Understanding Gitlab CI tags

瘦欲@ 提交于 2020-04-08 00:53:07
问题 I've read documentation, some articles and you might call me dumb, but this is my first time working with a concept like this. I've registered runner with tag "testing" created tag "testing" in gitlab binded this runner, with particular project I've also added the same tag e.g. "testing"in my local repo. BUT how exactly is running my jobs dependent on those tags? Are all these operations necessary? If I push new code to repo, *.yml file is executed anyway as far as I tested. So what if I want

CentOS 7 安装Gitlab

会有一股神秘感。 提交于 2020-04-07 15:04:34
1、安装依赖 yum -y install policycoreutils openssh-server openssh-clients postfix 2、设置postfix开机自启,并启动,postfix支持gitlab发信功能 systemctl enable postfix && systemctl start postfix 3、下载gitlab安装包,然后安装 wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.9.2-ce.0.el7.x86_64.rpm rpm -i gitlab-ce-8.0.0-ce.0.el7.x86_64.rpm 4、修改gitlab配置文件指定服务器ip和自定义端口 vim /etc/gitlab/gitlab.rb 5、重置并启动GitLab gitlab-ctl reconfigure gitlab-ctl restart 来源: oschina 链接: https://my.oschina.net/taony/blog/3223146

How to run a gitlab-ci.yml job only on a tagged branch?

你。 提交于 2020-04-07 11:27:20
问题 How do I run a .gitlab-ci.yml job only on a tagged Master branch? job: script: - echo "Do something" only: - master - tags The above code will run if either condition exists: a Master branch or a tagged commit. My goal is to have this run for a production deploy, but it would require that it be on the Master branch and that it be tagged (with a version). Otherwise, I'll have another job that will push to staging if its missing a tag. 回答1: This behavior will be introduced in version 12. Open

How to run a gitlab-ci.yml job only on a tagged branch?

随声附和 提交于 2020-04-07 11:26:11
问题 How do I run a .gitlab-ci.yml job only on a tagged Master branch? job: script: - echo "Do something" only: - master - tags The above code will run if either condition exists: a Master branch or a tagged commit. My goal is to have this run for a production deploy, but it would require that it be on the Master branch and that it be tagged (with a version). Otherwise, I'll have another job that will push to staging if its missing a tag. 回答1: This behavior will be introduced in version 12. Open

Genkins git远程分支代码拉取 (四)

为君一笑 提交于 2020-04-07 10:12:03
1.远程拉取gitlab 工程分支,并在本地建立分支 具体过程 新建一个空文件 初始化 git init 自己要与origin master建立连接(下划线远程仓库链接) git remote add origin http://192.168.9.10:8888/root/game-of-life.git 把远程分支拉到本地(game-of-live-first_branch为远程仓库的分支名) git fetch origin game-of-live-first_branch 在本地创建分支game-of-live-first_branch并切换到该分支 git checkout -b game-of-live-first_branch origin/game-of-live-first_branch 把game-of-live-first_branch远程分支上的内容都拉取到本地 git pull origin game-of-live-first_branch 2.修改分支的内容并上传给远程分支 3.如果想在linux中拉取远程分支代码 [root@localhost rollBack]# git init Initialized empty Git repository in /test/rollBack/.git/ [root@localhost rollBack]#

【07】Jenkins:流水线(Pipeline)

烈酒焚心 提交于 2020-04-06 08:59:25
写在前面的话 个人认为 Pipeline 在 Jenkins 中算是一个优化性功能,它能够将我们的构建服务的整个过程流程化,这意味着当我们在执行到某一步的时候,可以添加询问,提示我们是否继续运行下一步。当然,这个东西并非我们必须的,在没有 Pipeline 的时候我们依旧能够很好的完成大部分项目的构建。但是 Pipeline 对于传统构建肯定是一个很好的补充,而且当你习惯以后会爱不释手。 关于流水线(Pipline) Jenkins 从 2.0 开始逐渐从一个 CI 工具转变成为 CD 工具,Pipeline 在其中扮演着至关重要的角色。配置由界面选择逐渐脚本化(采用 Groovy 脚本),我们可以将配置连同代码一起存放在代码仓库,实现版本控制。一次编写,到处运行。 在 Pipeline 中有两个主要关键字需要先简单的了解,可能有些地方还能见到 Step 关键字: 1. Stage:阶段,这其实就是我们将任务细分为多个过程。 2. Node:节点,前面提到过,Jenkins 是可以分布式的,Node 标记着具体在 Master 还是 Slave 运行这个构建。 简单上手 可能我们目前并不知道 Groovy 脚本的语法到底是什么样子,但是可以结合下面的例子慢慢的进行了解。 1. 新建 Pipeline 任务: 可以发现 Pipeline 的配置非常简单,简单到你都找不到哪里拉取代码

gitlab私服搭建

孤街醉人 提交于 2020-04-06 07:16:55
1.什么是gitlab: gitlab 是一个用于仓库管理系统的开源项目,它以git为代码管理工具,因此代码可以管到它上边来。搭建私服gitlab可以方便我们有条不紊的管理我们的代码。闲话不说,上代码(本文以docker容器的形式安装配置gitlab)。 2.安装与部署: (1)用docker容器管理并安装gitlab镜像(这里采用最新的社区版gitlab镜像) sudo docker pull gitlab/gitlab-ce:latest (2)使用docker运行一个gitlab容器: docker run --name gitlab -d \-v /gitlab/config:/etc/gitlab \-v /gitlab/repo:/var/opt/gitlab \ -v /gitlab/log:/var/log/gitlab \ -p12000:22 -p 11000:80 -p 10000:433 \ gitlab/gitlab-ce:latest (3)效果展示: 注意:gitlab默认安装好的账户名是:root,密码是可以重置的 来源: https://www.cnblogs.com/diligent-lsh/p/9724664.html

Gitlab系统设置

我是研究僧i 提交于 2020-04-06 02:21:35
Gitlab系统设置 对于我们企业私有仓库来说,不希望用户注册,用户一注册就乱了,很麻烦,一般是来一个人给他分配一个用户,给他配好对应权限 GitLab 关闭用户注册 我们 Gitlab 系统是企业内部私有代码仓库,所有用户都是由管理员创建,并不需要注册功能,因此我们需要关闭此功能。 使用 root 用户登录,点击页面上方的 Admin area 进入 Settings 页面,下拉页面找到 Sign-up Restrictions 选项 不要关闭sign-in enable 关闭了就不能登录 取消 Sign-up enabled 选项前面的勾选,下拉到页面的下方,点击 Save 按钮完成配置。退回到系统的登录页面,发现已经没有用户注册功能 发现没有sign-up gitlab自定义登录界面 使用 root 用户登录,点击页面上方的 Admin area 点击外观定制 来源: https://www.cnblogs.com/mingerlcm/p/12588826.html

GitLab 仓库管理 创建一个仓库

时光毁灭记忆、已成空白 提交于 2020-04-06 02:13:41
Gitlab 仓库管理 GitLab 是通过组(group)的概念来统一管理仓库(project)和用户(user),通过创建组,在组下再创建仓库,再将用户加入到组,从而实现用户与仓库的权限管理 创建仓库之前先创建组 创建组 creategroup 在管理员页面点击页面顶部的 Admin area 按钮,进入管理员区域 在页面右侧点击绿色的 New group 按钮,进入创建组页面: 在创建组页面中,组路径和组名称为必填项,而且此两处内容好一致: 组的路径和组的名称一致,组的描述可写可不写 注:visibility Level:选择谁可以访问该组:我们默认选择 private 即可, Private:只有授权的用户才可以看到 分配的用户 Internal:只要是登录 gitlab 的用户就可以看到 Public:只要可以访问 gitlab web 页面的人就可以看到 点击页面下的 create group 按钮,完成组的创建,进入组管理页面 在页面我们可为组添加用户。 默认有一个管理员用户 创建用户 createuser 在管理员页面点击页面顶部的 Admin area 按钮,进入管理员区域 在页面右侧点击绿色的 New user 按钮,进入创建用户页面: 在创建用户页面,输入用户名昵称、用户名、电子邮件、选择用户级别 创建dev用户 点击页面下部的 create user 按钮