Giter VIP home page Giter VIP logo

grelease's Introduction

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]


grelease's People

Watchers

 avatar

Forkers

qipa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.