Skip to content

Grelease是linux下的git代码发布控制系统,如果你的环境是linux+git+node,那么grelease是你最好的选择。Grelease is a code release control system for git project,which runs under linux and if your environment is linux+git+nodejs grelease is best for you.

Notifications You must be signed in to change notification settings

shixinzi/grelease

Repository files navigation

Grelease发布系统配置及使用说明

为保证最佳的使用体验请各位使用最新的v3版本

详细使用说明参见:grelease使用说明.pdf

a、配置

1、stash web--> beeper repo --> settings --> hooks --> add hook --> find and add this hook <External Async Post Receive Hook>

2、configure the <External Async Post Receive Hook> on stash web
Executeable path:      /usr/local/atlassian-stash/external-hooks/stash_hooks_v3.sh
Positional parameters: auto_trigger_by_git_beeper_repo
click save and exit

3、on the stash server
under stash root dir:
mkdir -p /usr/local/atlassian-stash/external-hook/log
cd /usr/local/atlassian-stash/external-hook
wget https://raw.githubusercontent.com/LaiJingli/grelease/master/stash_hooks_v3.sh
chmod +x stash_hooks_v3.sh

ps. stash_hooks trigger publish server to auto publish by ssh remote execute commands as stash-hooks-auto-publish user on the publish server.

4、on the publish server
under pushlish root dir: /backup/autoshell
mkdir /backup/autoshell/log
mkdir /backup/autoshell/tmp
cd /backup/autoshell
wget https://raw.githubusercontent.com/LaiJingli/grelease/master/yunniao_release_v3.sh
wget https://raw.githubusercontent.com/LaiJingli/grelease/master/yunniao_release_v3.conf
chmod +x yunniao_release_v3.sh
chown ynrelease.ynrelease /backup/autoshell -R

5、configure for publish user automaticly go to  publish system when they login from ssh
tail -n 8 /etc/bashrc
###add by lai for yunniao release system
if [ $UID -ge 10000 ] && [ $UID -lt 10050 ];then
	#echo 发布用户:$UID
	shell_script_path=/backup/autoshell/yunniao_release_v3.sh
	log_file_name=/backup/autoshell/log/$(date +%Y%m%d)_screen_$(whoami)
	exec /usr/bin/script -q -t -c "$shell_script_path" 2>$log_file_name.date  -a  -f $log_file_name.log
fi

ps1. publish user is a normal linux system user and whoes uid must range from 10000 to 10050 for your convenience,
    and whoes must be a member of ynrelease group.

ps2. publish server trigger web server to update by ssh remote execute commands as www user on the web server.

6、on the web server
under the web root dir: /var/www/beeper_v2
chown www.www /var/www/beeper_v2 -R

and add the www user's ssh public key to the stash server for automaticly update local code without inputting a password.


7、server side configuriton is done.


b、使用
1、user manually trigger pushlish process: ssh [email protected]

2、trigger by stash hooks when git user made a push operation,it is controlled by hooks on the stash server without manual intervence.

3、browse the publish log details at http://192.168.1.121/stash_hooks_auto_publish_log


last,good luck for you,any questions is  welcome to contack with [email protected]


About

Grelease是linux下的git代码发布控制系统,如果你的环境是linux+git+node,那么grelease是你最好的选择。Grelease is a code release control system for git project,which runs under linux and if your environment is linux+git+nodejs grelease is best for you.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages