linclin / gopub Goto Github PK
View Code? Open in Web Editor NEWvue.js(element框架)+golang(beego框架)开发的运维发布系统,支持git,jenkins版本发布,go ssh,BT两种文件传输方式选择,支持部署前准备任务和部署后任务钩子函数
License: Apache License 2.0
vue.js(element框架)+golang(beego框架)开发的运维发布系统,支持git,jenkins版本发布,go ssh,BT两种文件传输方式选择,支持部署前准备任务和部署后任务钩子函数
License: Apache License 2.0
我用docker来运行的,没试过直接运行,发现个问题,每次重启数据库都会被删掉重新创建
添加用户后,没有密码设置栏,用户无法登录。
执行linux命令没有问题,执行脚本xxx.sh的时候报错,在机器本地执行脚本是没问题的
mv -fT /data/releases/xxx/current-boheyan.tmp /data/www/walle
上线部署到这一条的时候报错。
cd /tmp/simu/go-test-20180410-101436 && tar --preserve-permissions -czf /tmp/simu/go-test-20180410-101436.tar.gz .
执行结果:
tar: unrecognized option: preserve-permissions
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.
Usage: tar -[cxtZzJjahmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...
Create, extract, or list files from a tar file
Operation:
c Create
x Extract
t List
f Name of TARFILE ('-' for stdin/out)
C Change to DIR before operation
v Verbose
Z (De)compress using compress
z (De)compress using gzip
J (De)compress using xz
j (De)compress using bzip2
a (De)compress using lzma
O Extract to stdout
h Follow symlinks
m Don't restore mtime
exclude File to exclude
X File with names to exclude
T File with names to include
错误:exit status 1
=============
看到支持Jenkins,为什么不支持下Gitlab CI呢?
多个项目同时发布的时候,有几率出现其中一个上线单读到别的项目配置的情况
1.可考虑增加jenkins编译,在发布上线时考虑项目是否编译
2.考虑多项目支持批量上线
ssh目标机器错误the user no key
LDAP登录验证支持
ps: unrecognized option: p
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
gopub failed to start.
你在src/agent/server.json
文件中带有ip,引起上面那个端口占用的问题
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]prebuild: [email protected]build: [email protected]
6 info lifecycle [email protected]
7 verbose lifecycle [email protected]build: unsafe-perm in lifecycle truebuild: PATH: /usr/local/lib/nodejs/node-v12.14.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/gopub/vue-gopub/node_modules/.bin:/usr/local/lib/nodejs/node-v12.14.1-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/opt/gopub/bin:/root/bin
8 verbose lifecycle [email protected]
9 verbose lifecycle [email protected]build: CWD: /opt/gopub/vue-gopubbuild: Args: [ '-c', 'node build/build.js' ]
10 silly lifecycle [email protected]
11 silly lifecycle [email protected]build: Returned: code: 1 signal: nullbuild: Failed to exec build script
12 info lifecycle [email protected]
13 verbose stack Error: [email protected] build: node build/build.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/lib/nodejs/node-v12.14.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:223:5)
13 verbose stack at ChildProcess. (/usr/local/lib/nodejs/node-v12.14.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:223:5)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd /opt/gopub/vue-gopub
16 verbose Linux 3.10.0-1062.9.1.el7.x86_64
17 verbose argv "/usr/local/lib/nodejs/node-v12.14.1-linux-x64/bin/node" "/usr/local/lib/nodejs/node-v12.14.1-linux-x64/bin/npm" "run" "build"
18 verbose node v12.14.1
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error
有没有 docker-compose方式启动的说明
/data/web/gopub/src/github.com/astaxie/beego/tree.go:144:9: expected operand, found 'range'
/data/web/gopub/src/github.com/astaxie/beego/tree.go:149:4: expected '{', found 'if'
/data/web/gopub/src/github.com/astaxie/beego/tree.go:203:34: expected ')', found 'IDENT' string
/data/web/gopub/src/github.com/astaxie/beego/tree.go:257:10: expected operand, found 'range'
/data/web/gopub/src/github.com/astaxie/beego/tree.go:262:5: expected '{', found 'if'
/data/web/gopub/src/github.com/astaxie/beego/tree.go:286:30: expected ')', found 'IDENT' string
/data/web/gopub/src/github.com/astaxie/beego/tree.go:294:1: expected 1 expression
/data/web/gopub/src/github.com/astaxie/beego/tree.go:294:30: expected ')', found 'IDENT' string
/data/web/gopub/src/github.com/astaxie/beego/tree.go:295:2: expected ']', found 'if'
/data/web/gopub/src/github.com/astaxie/beego/tree.go:295:5: expected ';', found 'IDENT' len
/data/web/gopub/src/github.com/astaxie/beego/tree.go:389:45: expected operand, found ']'
/data/web/gopub/src/golang.org/x/net/webdav/prop.go:110:40: expected '}', found ':'
/data/web/gopub/src/golang.org/x/net/webdav/prop.go:171:2: expected declaration, found 'if'
/data/web/gopub/src/golang.org/x/net/webdav/prop.go:182:2: expected declaration, found 'if'
/data/web/gopub/src/golang.org/x/net/webdav/prop.go:230:2: expected declaration, found 'if'
/data/web/gopub/src/golang.org/x/net/webdav/prop.go:353:3: expected declaration, found 'IDENT' xml
/data/web/gopub/src/golang.org/x/net/webdav/prop.go:395:2: expected declaration, found 'IDENT' n
2019/01/18 15:58:48 [I] [base.go:353] [{0 127.0.0.1 cd /root/gopubfakegit/release/fakegit/ && rm -f /root/gopubfakegit/release/fakegit/*.tar.gz && rm -rf /root/gopubfakegit/release/fakegit/20190116-114418 2019-01-18 15:58:48.310589532 +0800 CST m=+594667.324144406 2019-01-18 15:58:48.326845324 +0800 CST m=+594667.340399867 <nil> }]
[ORM]2019/01/18 15:58:48 -[Queries/default] - [ OK / db.QueryRow / 2.7ms] - [SELECT `id`, `user_id`, `task_id`, `status`, `action`, `command`, `duration`, `memo`, `created_at` FROM `record` WHERE `id` = ? ] - `1268`
[ORM]2019/01/18 15:58:48 -[Queries/default] - [ OK / db.QueryRow / 2.8ms] - [SELECT `id`, `user_id`, `task_id`, `status`, `action`, `command`, `duration`, `memo`, `created_at` FROM `record` WHERE `id` = ? ] - `1268`
[ORM]2019/01/18 15:58:48 -[Queries/default] - [ OK / db.Exec / 5.9ms] - [UPDATE `record` SET `user_id` = ?, `task_id` = ?, `status` = ?, `action` = ?, `command` = ?, `duration` = ?, `memo` = ?, `created_at` = ? WHERE `id` = ?] - `3`, `67`, `1`, `0`, `cd /root/gopubfakegit/release/fakegit/ && rm -f /root/gopubfakegit/release/fakegit/*.tar.gz && rm -rf /root/gopubfakegit/release/fakegit/20190116-114418`, `0`, `[{"Id":0,"Host":"127.0.0.1","Command":"cd /root/gopubfakegit/release/fakegit/ \u0026\u0026 rm -f /root/gopubfakegit/release/fakegit/*.tar.gz \u0026\u0026 rm -rf /root/gopubfakegit/release/fakegit/20190116-114418","LocalFilePath":"","RemoteFilePath":"","Result":"","StartTime":"2019-01-18T15:58:48.310589532+08:00","EndTime":"2019-01-18T15:58:48.326845324+08:00","Error":null,"ErrorInfo":""}]`, `1547798328`, `1268`
Number of records updated in database: 1
[ORM]2019/01/18 15:58:48 -[Queries/default] - [ OK / db.Exec / 4.5ms] - [UPDATE `task` SET `enable_rollback`='0' WHERE`id` not in (67) and project_id = ? and `enable_rollback`=1 ] - `14`
[ORM]2019/01/18 15:58:48 -[Queries/default] - [ OK / db.QueryRow / 1.4ms] - [SELECT `id`, `user_id`, `name`, `level`, `status`, `version`, `repo_url`, `repo_username`, `repo_password`, `repo_mode`, `repo_type`, `deploy_from`, `excludes`, `release_user`, `release_to`, `release_library`, `hosts`, `pre_deploy`, `post_deploy`, `pre_release`, `post_release`, `last_deploy`, `audit`, `keep_version_num`, `created_at`, `updated_at`, `p2p`, `host_group`, `gzip`, `is_group`, `pms_pro_name` FROM `project` WHERE `id` = ? ] - `14`
[ORM]2019/01/18 15:58:48 -[Queries/default] - [FAIL / db.Exec / 1.6ms] - [UPDATE `project` SET `user_id` = ?, `name` = ?, `level` = ?, `status` = ?, `version` = ?, `repo_url` = ?, `repo_username` = ?, `repo_password` = ?, `repo_mode` = ?, `repo_type` = ?, `deploy_from` = ?, `excludes` = ?, `release_user` = ?, `release_to` = ?, `release_library` = ?, `hosts` = ?, `pre_deploy` = ?, `post_deploy` = ?, `pre_release` = ?, `post_release` = ?, `last_deploy` = ?, `audit` = ?, `keep_version_num` = ?, `created_at` = ?, `updated_at` = ?, `p2p` = ?, `host_group` = ?, `gzip` = ?, `is_group` = ?, `pms_pro_name` = ? WHERE `id` = ?] - `3`, `g4Test-取消维护状态`, `2`, `1`, `20190118-155846`, `/root/gopubfakegit/fakegit`, ``, ``, `branch`, `git`, `/root/gopubfakegit/clonegit`, ``, `root`, `/root/gopubfakegit/deploy`, `/root/gopubfakegit/release`, `127.0.0.1`, `echo "代码检出前任务:"`, `echo "代码检出后任务::"`, `echo "同步完目标机后任务"`, `echo "更改版本软链接后任务::"
/opt/soft/node/bin/node -v
source ~/.bash_profile
cd /data/wanba_bug/app/gong4-server/tools
/opt/soft/node/bin/node ./sh.process.js type=maintainend
`, `echo "版本发布发布完成后执行本地任务:::"`, `0`, `1`, `<nil>`, `<nil>`, `0`, ``, `1`, `0`, ``, `14` - Error 1210: Incorrect arguments to mysqld_stmt_execute
[ORM]2019/01/18 15:58:48 -[Queries/default] - [ OK / db.Exec / 5.2ms] - [INSERT INTO `task_err_log` (`task_id`, `err_info`, `create_time`) VALUES (?, ?, ?)] - `67`, `Error 1210: Incorrect arguments to mysqld_stmt_execute`, `2019-01-18 07:58:48.347229896 +0000 +0000`
运行一段时间以后就会出现这个问题。 重启一下就好了。
gopub灰度发布时候 ip端口不对问题
查询上线单功能,Search栏输入查询无效果,请看下这个bug
有没有QQ群、微信群可以探讨交流使用、二开经验
现在的用户只能添加。 不能删除和修改已有的权限。使得操作很麻烦
文章没有说部署后形式, 问一下部署后是否跟瓦力一样是软链形式?
ListenAndServe: listen tcp 0.0.0.0:8192: bind: address already
1525399664652004292 [Error] Listen failed:listen tcp 10.205.142.27:1902: bind: cannot assign requested address
1525399664652020021 [Error] Couldn't listen for peers connection: listen tcp 10.205.142.27:1902: bind: cannot assig
2018/05/04 10:07:44 Starting http server 10.205.142.27:1901
如题
The api can access without authentication
jenkins方式拉取代码 wget 需要添加登陆信息
最新的可以帮忙打包一个么?为啥我自己打包老不成功。带ldap的
项目配置已经指定了 172.xx.xx.xxx:3000 端口,就是我的ssh端口
检测也通过了
在上线部署的时候就报错了,为什么还是走的22port
谢谢。
gopub的删除接口
你好,请问你们使用gopub 发布过golang 的程序吗?现在我们使用gopub的工程中,遇到的问题是,我们所有的项目都在一个github地址下面,里面包含了多个小的golang 程序,发布的时候,不知道怎么处理?而且你们的程序里面没有golang 程序的编译部分,这个有没有已经写好的推荐脚本了?
git tag发布支持
➜ gopub git:(master) ✗ ./control build
github.com/cihub/seelog/archive/archive.go:4:2: cannot find package "archive/tar" in any of:
/usr/local/go/src/archive/tar (from $GOROOT)
/Volumes/Macintosh HD/mygithub/gopub/src/archive/tar (from $GOPATH)
github.com/cihub/seelog/archive/archive.go:5:2: cannot find package "archive/zip" in any of:
/usr/local/go/src/archive/zip (from $GOROOT)
/Volumes/Macintosh HD/mygithub/gopub/src/archive/zip (from $GOPATH)
➜ brew info go
go: stable 1.10.2 (bottled), HEAD
Open source programming language to build simple/reliable/efficient software
https://golang.org
/usr/local/Cellar/go/1.10.2 (8,161 files, 336.8MB) *
Poured from bottle on 2018-05-06 at 19:58:01
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/go.rb
==> Requirements
Required: macOS >= 10.8 ✔
==> Options
--without-cgo
Build without cgo (also disables race detector)
--without-race
Build without race detector
--HEAD
Install HEAD version
==> Caveats
A valid GOPATH is required to use the go get
command.
If $GOPATH is not specified, $HOME/go will be used by default:
https://golang.org/doc/code.html#GOPATH
You may wish to add the GOROOT-based install location to your PATH:
export PATH=$PATH:/usr/local/opt/go/libexec/bin
➜ ln -s /usr/local/go /usr/local/opt/go/
➜ ls /usr/local/go
➜
1、拉取了版本:
lc13579443/gopub:latest
sudo docker run --name gopub -e MYSQL_HOST=127.0.0.1 -e MYSQL_PORT=3306 -e MYSQL_USER=root -e MYSQL_PASS=root -e MYSQL_DB=walle -p 8192:8192 --restart always -d lc13579443/gopub:latest
数据库数据没有初始放进去。
2、数据库中表不存在或者用户不存在的时候
点击登录按钮一直显示"正在登录中"
项目创建页面的更丰富的说明
您好,请问下ssh 端口非22,在哪可以改? 需要修改源码?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.