gitblit git SERVER window 安装配置 hook post-receive 自动部署
项目中使用的是gitblit windos版
1.安装
需要JAVA SDK
http://gitblit.com/
Download Gitblit GO (Windows)
下载后,解压缩,放到例如 D:/gitblit
打开此目录
gitblit.cmd #启动
gitblit-stop.cmd #停止
installService.cmd #注册服务
我选择的是注册服务installService.cmd,以后系统重启时,git 自动启动
2.配置
Gitblit目录下的/data/gitblit.properties文件
代码库
git.repositoriesFolder= D:/gitRep
访问端口号
server.httpPort = 8080
HTTPS端口
server.httpsPort=8443
管理地址就是 http://1270.0.1:8080 管理员默认admin/admin
3.自动部署
这边是依葫芦画瓢完成的(根据localclone.groovy)。
gitblit 所有钩子都放在这个目录 D:/gitblit/data/groovy
把localclone.groovy复制另存为 autotest.troovy
修改autotest.troovy中的
def rootFolder = 'c:/test'#修改为def rootFolder = 'E:/www/'
rootFolder:自动部署 根目录
def destinationFolder = new File(rootFolder,StringUtils.stripDotGit(repoName)) :
destinationFolder :新保存地址,最后目录地址
StringUtils.stripDotGit(repoName):获取git 项目仓库名称,去除.git
如果不需要此目录可以这么设置
def destinationFolder = new File(rootFolder,'')
意思就是 使用 rootFolder 为最后部署目录
最后要设置钩子了
进入管理界面->test版本库->编辑版本库->receive
最后保存.到此 自动部署 设置完成
gitblit git SERVER window 安装配置 hook post-receive 自动部署的更多相关文章
- SQL Server 2012安装配置(Part4 )
SQL Server 2012安装配置(Part1) SQL Server 2012安装配置(Part2) SQL Server 2012安装配置(Part3 ) SQL Server 2012安装配 ...
- SQL Server 2012安装配置(Part3 )
SQL Server 2012安装配置(Part1 ) SQL Server 2012安装配置(Part2 ) SQL Server 2012安装配置(Part3 ) 3 客户端安装 3.1 安装客户 ...
- 2.Bacula Server端安装配置
1. Bacula Server端安装配置 1.1. Bacula Server端安装 1.1.1. 安装bacula依赖包 For Centos6: yum install -y mysql ...
- centos 安装git服务器,配置使用证书登录并你用hook实现代码自动部署
安装git服务器先安装依赖软件:yum -y install gcc zlib-devel openssl-devel perl cpio expat-devel gettext-devel open ...
- [VSTS] 从零开始 Team Foundation Server 2010 安装配置详细图文教程
http://www.cnblogs.com/WilsonWu/archive/2011/11/24/2261674.html 近期公司要配TFS用于新项目的管理,公司也将逐步迁移至VSTS平台,前期 ...
- CentOS6.4下Git服务器Gitosis安装配置
1.安装GIt: #yum install git 2.增加一个git用户 #useradd git #passwd git 3.创建git仓库存储目录,设置权限 #mkdir /home/git/r ...
- jenkins之从0到1利用Git和Ant插件打war包并自动部署到tomcat(第二话):安装插件,配置JDK、Git、Ant
jenkins之所以这么强大,离不开丰富的插件库. 要确保jenkins上安装好Git plugin.GitHub plugin.AntPlugin插件,一般在启动jenkins时默认安装的插件中就包 ...
- Git & GitHub 的安装配置
参考 教你免费搭建个人博客,Hexo&Github 安装Git 1. 注册 GitHub 注册.登录 https://github.com/ 2. 创建仓库 在 GitHub 的右上角 ...
- Git介绍及安装配置
一.概述 1.1git概念 Git是一个开源的分布式版本控制系统,用于敏捷高效处理任意规模的项目,其作者为Linux创造者Linus Torvalds为管理Linux内核而开放的一个开源的版本控制柔软 ...
随机推荐
- 006_硬件基础电路_MOS管
从文档中提取有用信息 链接:https://pan.baidu.com/s/1fR7ZyGDgapOdd-FtjQ6m8Q提取码:an11 复制这段内容后打开百度网盘手机App,操作更方便哦 判断三个 ...
- SpringBoot监控中心
1.什么是SpringBoot监控中心? 2.为什么要使用SpringBoot监控中心?
- snmp_trap/snmptt
Zabbix Snmp Trap 配置 1. Zabbix Server 操作 1.1 Snmp Trap 安装配置 yum install -y net-snmp net-snmp-utils vi ...
- leetcode解题报告(21):Majority Element
描述 Given an array of size n, find the majority element. The majority element is the element that app ...
- Selenium 八种元素定位方法
前言: 我们在做WEB自动化时,最根本的就是操作页面上的元素,首先我们要能找到这些元素,然后才能操作这些元素.工具或代码无法像我们测试人员一样用肉眼来分辨页面上的元素.那么我们怎么来定位他们呢? 在学 ...
- Java学习日记基础篇(四)——类,对象之成员变量,成员方法,构造方法
面向对象(Object Oriented) 一.面向对象杂谈 面向对象(Object Oriented),我的翻译是以物体为目标的,就是说编程的时候是建立一个物体,然后对这个物体进行操作. Java语 ...
- 【2018.08.01】(表/栈/队列/大小顶堆)学习Stark和Queue算法小记
Train Problem I As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of st ...
- Gitlab 服务器搭建
一.官网地址 首页:https://about.gitlab.com/ 安装说明:https://about.gitlab.com/installation/ 二.安装命令摘录 实际问题:yum 安装 ...
- 配置mysql远程访问
参考: https://www.cnblogs.com/sanduzxcvbnm/p/9789236.html
- Mysql --- Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
我使用的5.5的mysql数据库会报这个错, 换成5.7的就可以了