autom

command module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2022 License: MIT Imports: 1 Imported by: 0

README

AUTOM

功能简要

web钩子连接地址:http://[host]:[port]/hook

自动接收来自git的推送事件(目前支持push/tag_push)来构建运行目标项目, 并用反代或端口映射来暴露端口

  • 安装
go install github.com/uccu/autom
  • 配置文件
[{
    "network_name": "autom",  // 网络名称
    "subnet": "172.20.0.0/16", // 网段
    "containers": [{
            "name": "test", // 项目名称
            "tag": false, // 是否更新tag时候触发,不包括删除tag,为false时则更新分支时触发
            "branch": "master", // 分支名字,tag为true时无效
            "ip": "172.20.0.2", // 创建容器ip
            "url": "git@test.com:test/test.git", // 项目git地址
            "volumes": {}, // true dir: container dir的字典
            "token": "123123123123123" // gitlab 验证用TOKEN
        },
        {
            "name": "test",
            "tag": true,
            "ip": "172.20.0.3",
            "url": "git@test.com:test/test.git",
            "volumes": {},
            "token": "123123123123123"
        }
    ]
}]
  • 运行
autom start
  • 停止
autom stop
  • 后台运行
autom start -d
  • 指定端口运行
autom start -p 443
  • 指定配置
autom start -c base.json
  • 指定运行目录
autom start -e /home/autom
  • 指定输出日志文件
autom start -l info.log
  • 运行指定脚本
autom start -i test:v1.1
未来规划
  • 优化通过pid文件的方式开启关闭服务
  • docker 支持远程api操作
  • 非git方式,文件上传方式/url下载方式更新项目
  • 用户系统
  • windows系统接收项目上线消息功能

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
dev
model
service
git
util
cli
fs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL