我有一些 Elasticsearch 的插件,比如这个: https://github.com/medcl/elasticsearch-analysis-ik ,每过一段时间需要更新一下版本,因为 Elasticsearch 的版本更新了,一般来说,我的工作流程是这样的:
好吧,很痛苦,更痛苦的是,我要维护 4 个这样的插件 …
你可能会问,你怎么不用 Travis 啊,没错,我确实是这样做的,一开始也是用 Travis 自动编译和上传,突然某一天,居然上传和部署不了了,我折腾了好几次,网上的文档基本上都照着改了,就是不 work 啊,今天我最后试了一下,还是不行,
https://travis-ci.org/medcl/elasticsearch-analysis-ik/builds/375477393
错误提示也是莫名,完全不知道怎么解决,Travis 对我来说是黑盒子,有知道这个怎么解决的,欢迎不吝赐教。
Installing deploy dependencies
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.15.0.gem (100%)
Successfully installed faraday-0.15.0
Fetching: public_suffix-3.0.2.gem (100%)
Successfully installed public_suffix-3.0.2
Fetching: addressable-2.5.2.gem (100%)
Successfully installed addressable-2.5.2
Fetching: sawyer-0.8.1.gem (100%)
Successfully installed sawyer-0.8.1
Fetching: octokit-4.6.2.gem (100%)
Successfully installed octokit-4.6.2
Fetching: mime-types-2.99.3.gem (100%)
Successfully installed mime-types-2.99.3
Fetching: dpl-releases-1.9.6.gem (100%)
Successfully installed dpl-releases-1.9.6
8 gems installed
dpl.2
Preparing deploy
Logged in as Medcl
Deploying to repo: medcl/elasticsearch-analysis-ik
Current tag is: v6.2.4
Cleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`. See https://docs.travis-ci.com/user/deployment#Uploading-Files-and-skip_cleanup.
Saved working directory and index state WIP on (no branch): 3dcedde update es to 6.2.4 (#545)
dpl.3
Deploying application
Already up-to-date!
Not currently on any branch.
nothing to commit, working tree clean
Dropped refs/stash@{0} (a1f2a54d910f3dd832968c79e13d1de6c7d2d691)
Done. Your build exited with 0.
好吧,还是自己来吧,反正我已经有Jenkins 在运行了。
首先创建一个项目,设置 Github 仓库地址:
注意限制只编译 Tag 分支,即只编译 release 的版本。
执行编译打包任务。
上传到 Github,使用 Github-release 命令。
本地留一份归档,方便自己下载使用,速度快点。
如图。
如图。