gitblit git SERVER window installation configuration hook post-receive automatic deployment

Used in the project is gitblit windos version

1. Install

Need JAVA SDK

http://gitblit.com/
Download Gitblit GO (Windows)

After the download, unzip, put such as D: / gitblit
open this directory 
gitblit.cmd # start
gitblit-stop.cmd # stop
installService.cmd # Registration Service

I chose is a registered service installService.cmd, later when the system is restarted, git automatically start

2. Configure

/Data/gitblit.properties files in the directory Gitblit
code base
git.repositoriesFolder = D: / gitRep
access port number
server.httpPort = 8080
HTTPS port
server.httpsPort = 8443

Management address is http: //1270.0.1: 8080 Administrator default admin / admin

3. Automatic deployment

Yihuhuhuapiao here is completed (according localclone.groovy).

gitblit all the hooks are placed in this directory D: / gitblit / data / groovy
to localclone.groovy copy Save as autotest.troovy

The modification autotest.troovy

 

def rootFolder = 'c: / test' # modify def rootFolder = 'E: / www /'

rootFolder: automatic deployment root directory

 

def destinationFolder = new File(rootFolder,StringUtils.stripDotGit(repoName))   :

destinationFolder: new saved address, the last address directory

StringUtils.stripDotGit (repoName): Gets git repository project name, remove the .git

If you do not set this directory can be so

 

def destinationFolder = new File(rootFolder,'') 

Meaning that the use of rootFolder for the final deployment directory
last to set the hook
into the management interface -> test repository -> Edit repository -> receive
. Finally save this automatic deployment setup is complete

 

Guess you like

Origin www.cnblogs.com/kinwing/p/11093822.html