Giter VIP home page Giter VIP logo

zhenorzz / goploy Goto Github PK

View Code? Open in Web Editor NEW
1.0K 16.0 160.0 17.92 MB

Devops, Deploy, CI/CD, Terminal, Sftp, Server monitor, Crontab Manager, Nginx Manager.

Home Page: http://www.goploy.icu

License: GNU General Public License v3.0

Go 43.80% JavaScript 0.02% HTML 0.03% Vue 44.11% CSS 0.22% Batchfile 0.01% Shell 0.12% SCSS 0.50% TypeScript 11.13% Dockerfile 0.07%
go deploy terminal cicd devops golang vue nginx

goploy's Issues

部署过程中偶发的会出现报错,但是日志中没有看到报错原因

部署过程中出现如下报错, 代码有部署到主机上 部署后执行的脚本也有全部执行成功。 部署日志中有效日志只有这一小段 不是必现的报错,只有偶尔会出现这个error
TRACE: 2022/08/08 11:26:39 SyncService.go:314: projectID:51 rsync --exclude goploy-after-pull.sh --include goploy-after-deploy.sh -rtv --exclude .git -e ssh -p 22 -o StrictHostKeyChecking=no -i KEY_FILE --rsync-path=mkdir -p /home/deploy/code/5edfb973-4b39-46ad-9b93-bd6089514ce6 && rsync /opt/goploy/repository/project_51/ deploy@IP:/home/deploy/code/5edfb973-4b39-46ad-9b93-bd6089514ce6
ERROR: 2022/08/08 11:26:42 SyncService.go:425: ssh command err: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M100 112 100 42 100 70 84 140 --:--:-- --:--:-- --:--:-- 154^M100 112 100 42 100 70 84 140 --:--:-- --:--:-- --:--:-- 154
TRACE: 2022/08/08 11:26:42 SyncService.go:162: projectID:51 deploy fail

对功能上的一点建议

比较看好该项目,目前市面上很多部署工具要么界面很丑,要么配置复杂,要么部署复杂,该项目部署简单,支持一键部署,界面也还可以,不过任何项目都不是完美的,下面给项目提一点建议:

  1. 可否添加用户名密码拉去代码功能
  2. 将git代码库的ssh key修改为界面配置
  3. 支持sqlite嵌入式数据库
  4. 可以参考腾讯蓝盾
    • 流水线节点可自定义行为
    • 服务器节点添加,通过安装代理包方式自动添加
    • 模块化/插件化项目功能

Table 'goploy.monitor' doesn't exist"

Describe the bug
time="2024-03-26T10:34:53+08:00" level=error msg="get monitor list error, detail:Error 1146: Table 'goploy.monitor' doesn't exist" func="task.monitorTask()" file="monitor.go:63"

To Reproduce
Steps to reproduce the behavior:
启动项目后输出该日志,网页可以正常打开

Screenshots
image

项目-传输选项

传输方式: sftp
传输选项:pull -r ${REPOSITORY_PATH}/Apis/bin/Debug/ ${PROJECT_PATH}
问题:
配置的 源文件夹:${REPOSITORY_PATH}/Apis/bin/Debug/
详情中 传输信息中的是 ${REPOSITORY_PATH}/Apis/bin/Debug/
但实际 传的是 ${REPOSITORY_PATH} 整个文件夹

谢谢您的分享~

软链发布的问题

简单体验了下软链发布的方式,到目的端之后,每次发布都对应了一个目录,是不是搞错了,理论上应该是同步到版本目录之后,再软链到固定的一个目录里吧。
另外目前的拉取后操作还不是很懂,用mvn报没有这个命令,是构建的时候起了一个独立于系统的bash么?
另外希望能够在文档里给出一些环境变量,诸如Jenkins的 $WORKSPACE 这样的,以便于灵活控制部署。
最后,感谢优秀项目的开源,学习中!

关于系统使用总结

经过部署使用,发现的问题总结如下:

  1. 登录没有验证码,安全性差,别人可以暴力破解
  2. 项目设置-》基本配置,传输方式为定制时候,不支持多行多命令,选择sftp或者rsync一样的问题
  3. 部署后运行脚本的日志缺失
  4. 部署后运行失败也显示成功
  5. 无论是部署后运行脚本还是部署完成后运行脚本,需要在目标机器生成,而不是在构建机器时候生成,这样如果遇到自己定制传输方式的时候,就会漏掉文件导致打包失败

在部署后执行脚本,执行失败,提示/usr/bin/env: "php": 没有那个文件或目录

Describe the bug
部署一个PHP项目,在执行部署后运行执行脚本,失败

To Reproduce
Steps to reproduce the behavior:

  1. 在项目那里的执行后脚本,填入了 composer install
  2. 执行构建报错:exit status 127 output: /usr/bin/env: "php": 没有那个文件或目录,但是在目标服务器,是可以执行composer命令
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

APP (please complete the following information):

  • OS: Ubuntu22.04
  • Version 1.16.2
  • Browser chrome

Additional context
Add any other context about the problem here.

建议增加批量执行脚本的功能

系统已经有主机SSH KEY,不但可以发布的操作,也可以对一些选定的主机做批量执行脚本,
类似https://github.com/openspug/spug
任务管理--》创建和修改,删除任务(任务里面可以定义脚本和选择需要执行的主机一台或多台,和定时执行),
也可以手动执行任务;
这个里面的批量执行功能,但这系统是py的,不想用,可以考虑下要不要,祝系统越来越好!

建议每个项目增加统计功能

现在比较流行说提升效能,要提升就要看相应的指标,所以需要每个项目的统计,指标如下
构建次数
构建频率
构建时长
构建失败率
构建修复时间
构建类型
部署发布版本数量
部署发布频率
部署发布时间
部署发布成功率
部署发布回滚率
项目很好,建议可以加下这个功能那就非常非常好了!

请问支持url触发构建吗?

作者,您好, 请问goploy支持url触发构建吗?我在管理后台找了一圈也没有找到类似的功能呢, 是没有还是没有发现到.

增加服务器分组功能

服务器数量多的时候,创建新项目发布需要一台一台添加服务器,有时候增减服务器也需要再次编辑同步,容易出错。建议在添加服务器设置的时候就增加分组或者分类标签功能,这样在发布项目的时候可以直接增减按组或者分类来选择机器。增减服务器也不需要再次编辑项目。

期望改善Windows/Windows Server下使用OpenSSH Server时传输文件以及远程执行脚本的支持

特性描述
目标服务器环境: 常见的较新的windows环境(能支持安装OpenSSH Server即可,如Windows 10/11, Windows Server 2019等),且安装了OpenSSH Server

我需要在构建步骤中传输编译好的单个文件,在项目配置里面,传输文件的方式我尝试了几种方式(2和3可用):

  1. sftp: 由于goploy会自动加上src, dst参数,似乎不像rsync命令那样,没有比较好的方式能exclude掉其他的不需要的文件

  2. custom + 部署后运行脚本(bat): 为了规避方式1的问题,我使用了这个命令形式sshpass -p ${SERVER_PASSWORD} scp ${REPOSITORY_PATH}/app.jar ${REPOSITORY_PATH}/goploy-after-deploy-p${PROJECT_ID}-s${PROJECT_ENV}.bat ${SERVER_OWNER}@${SERVER_IP}:${PROJECT_PATH},可以先忽略sshpass这个暴露密码的槽点,我知道有其他更好的方式。这里想表达的问题其实是,官方的使用文档没有描述在custom的情况下,还需要传输脚本这个情况,我也是看了后台日志(不是构建日志)报错之后才看到的。这里还有一个问题,就是服务端暴露了"传输命令必须包含部署后运行脚本"这个逻辑到构建配置中,且脚本逻辑的名称也耦合到脚本中了,如果能增加一个${AFTER_DEPLOY_SCRIPT_NAME}之类的环境变量也许更好?

  3. custom + 部署后运行脚本(bash): 我将OpenSSH的默认终端改为了git的bash.exe(由于业务上的脚本运行原因),这时传输脚本也得相应修改sshpass -p ${SERVER_PASSWORD} scp ${REPOSITORY_PATH}/app.jar ${REPOSITORY_PATH}/goploy-after-deploy-p${PROJECT_ID}-s${PROJECT_ENV}.sh ${SERVER_OWNER}@${SERVER_IP}:${PROJECT_PATH},这也是结合第2点来讲体验不太好的一个点。这种方式使用还有一个bug,我配置了该服务器为windows服务器,服务端执行脚本的方式就是cmd /c ...,导致我的sh脚本实际使用的是cmd来执行,于是报错了。我觉得应该根据脚本的类型而不是服务器类型来判断?

另外,bat脚本内中文的支持似乎有问题,比如windows默认为gbk,构建就会报错,日志内容类似Incorrect string value: '\\xB2\\xBB\\xCA\\xC7\\xC4\\xDA...' for column 'detail' at row 1",我通过脚本内编写chcp 65001解决了这个问题,但是体验上不是很好,因为必须查日志文件才能知道问题,门槛还是略高,可以看怎么改善一下这个体验

附加
这个项目确实挺好的,我比较喜欢这种占用资源少,功能恰好够用的产品。可惜本人是多年的javaer,对go不太熟悉,不然我非常想自己贡献一下。上面的问题也是连续研究尝试了两天,才终于配置成功了在windows上使用。如果有其他人有类似场景的需要,希望也能从上面的描述中得到帮助~

使用两天,一些使用建议

试用了两天,总体感觉还是非常好用的,结合个人的项目情况和使用习惯,提供几个建议

1 PROJECT_NAME 我理解相当于项目编码,一般是英文,但是少了中文字段,希望增加一个PROJECT_Description或者PROJECT_label,存储中文字段,方便测试人员或者其他非开发人员使用这个系统

2 目前在部署路径和传输选项没办法使用预定义变量,希望增加支持,例如
部署路径 : /opt/goploy-project/${PROJECT_NAME}
传输选项: -rtv --include ${PROJECT_NAME}.jar

3希望在预定义变量里面增加部署环境变量,更方便编写统一的部署脚本,例如
./project-start --env=${PROJECT_ENV}
PROJECT_ENV=prod(生产环境) prod-pre(预生产环境) test(测试环境) dev(开发环境)

4 内置的四套环境大部分情况下够用了,但是有些情况还是不够用,希望有自定义部署环境的功能

钉钉通知无效

版本:1.4
通知选择钉钉并填写Webhook地址,构建后无消息推送

配置跳板机部署时问题

Describe the bug

  1. 添加页面,跳板机主机和部署主机检测顺序问题
  2. 构建完发布时,跳板机与目标机的传参问题

To Reproduce
Steps to reproduce the behavior:

  1. Go to 服务器设置 - 添加 - 测试连接,提示超时
  2. 通过修改数据库,进行部署时,ssh ProxyCommand 参数传入

Screenshots

  1. 应该先连接 跳板机,再连接目标机

    func (sshConfig SSHConfig) Dial() (*ssh.Client, error) {
    clientConfig, err := sshConfig.getConfig(sshConfig.User, sshConfig.Password, sshConfig.Path)
    if err != nil {
    return nil, err
    }
    // connect to ssh
    sshClient, err := ssh.Dial("tcp", sshConfig.addr(), clientConfig)
    if err != nil {
    return nil, err
    }
    if sshConfig.JumpHost != "" {
    conn, err := sshClient.Dial("tcp", sshConfig.jumpAddr())
    if err != nil {
    return nil, err
    }
    targetConfig, err := sshConfig.getConfig(sshConfig.JumpUser, sshConfig.JumpPassword, sshConfig.JumpPath)
    if err != nil {

  2. 当跳板机密码不为空时,应传入跳板机密码或密语

    func (ps ProjectServer) ToSSHOption() string {
    proxyCommand := ""
    if ps.ServerJumpIP != "" {
    if ps.ServerJumpPath != "" {
    if ps.ServerJumpPassword != "" {
    proxyCommand = fmt.Sprintf("-o ProxyCommand='sshpass -p %s -P assphrase ssh -o StrictHostKeyChecking=no -W %%h:%%p -i %s -p %d %s@%s' ", ps.ServerPassword, ps.ServerJumpPath, ps.ServerJumpPort, ps.ServerJumpOwner, ps.ServerJumpIP)
    } else {
    proxyCommand = fmt.Sprintf("-o ProxyCommand='ssh -o StrictHostKeyChecking=no -W %%h:%%p -i %s -p %d %s@%s' ", ps.ServerJumpPath, ps.ServerJumpPort, ps.ServerJumpOwner, ps.ServerJumpIP)
    }
    } else {
    proxyCommand = fmt.Sprintf("-o ProxyCommand='sshpass -p %s ssh -o StrictHostKeyChecking=no -W %%h:%%p -p %d %s@%s' ", ps.ServerPassword, ps.ServerJumpPort, ps.ServerJumpOwner, ps.ServerJumpIP)
    }
    }

APP (please complete the following information):

  • OS: Linux
  • Version 1.13.1
  • Browser chrome

标题错误

Golpoy - 自动化部署工具

Golpoy ? Goploy? 官网首页故意写错的?没人发现

ssh://git开头的地址测试连接失败,但是实际构建可用

问题描述
ssh://[email protected]:22/group/sub_group/project.git这个形式的git地址点"测试连接"无法连上,但是实际点确认可以保存成功,且后续构建可以正常拉取代码(只是在保存的时候,似乎会再次尝试连接,会有一个"timeout of 5000ms exceeded"的提示)

环境描述
git环境: 自建gitlab(14.10.2-ee)
goploy: 1.16.2

重现步骤
项目设置->新建项目->输入git地址->测试连接

支持k8s部署吗?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

发布出错

ERROR: 2022/11/16 15:55:10 Log.go:63: projectID: 79 Error 1114: The table 'publish_trace' is full

Demo 502 了

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

APP (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 1.9.0]
  • Browser [e.g. chrome, safari]

Additional context
Add any other context about the problem here.

reviewURL 没有 callback 参数

问题描述
项目发布审核打开之后,reviewURL 没有 callback 参数

环境描述

  • OS: Goploy Docker 镜像
  • Version: 1.16.1

配置的时候提示这个

Start to install the database...
panic: Error 1071: Specified key was too long; max key length is 767 bytes

goroutine 1 [running]:
main.install()
D:/Users/Administrator/docker-env/project/go/goploy/main.go:226 +0xcdb
main.main()
D:/Users/Administrator/docker-env/project/go/goploy/main.go:75 +0xd3

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.