-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simplify usage, add docker file, add readme #22
Conversation
Address issues: wangkuiyi#10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我对Go源码都没有问题。comments都是对README.md的。
RUN cd / && wget https://get.docker.com/builds/Linux/x86_64/docker-1.11.0.tgz && tar -xvf docker-1.11.0.tgz && mv /docker/docker /usr/bin/ && rm -rf /docker | ||
RUN mkdir /data | ||
ADD . /gopath/src/github.com/wangkuiyi/ci | ||
RUN cd /gopath/src/github.com/wangkuiyi/ci/ && GOPATH=/gopath go get ./... && GOPATH=/gopath CGO_ENABLED=0 go build && cp ci / && rm -rf /gopath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
将来我们把ci这个repo从wangkiuiyi 迁移到 paddlepaddle之后,这里需要修改一下url。
现在不用修改。只是记录一下。
"github.com/gorilla/mux" | ||
"github.com/urfave/negroni" | ||
"github.com/wangkuiyi/ci/db" | ||
"github.com/wangkuiyi/ci/github" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里将来也会需要改路径。我自己记录一下。
@@ -0,0 +1,120 @@ | |||
# Get code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 标志的是顶级head,也就是标题。这里可以是 # ci: A Distributed Continuous Integration System
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
go get github.com/wangkuiyi/ci | ||
cd $GOPATH/github.com/wangkuiyi/ci | ||
``` | ||
# Build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面的 # Get Code 和这里的 # Build 作为三级headings比较好, ### Get Code
和 ### Build from Source Code
。二级目录叫 # Build and Install
比较好。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,请问标题的名称什么时候首字母大写?为什么是### Build from Source Code
,而不是### Build From Source Code
,或者### Build from source code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为from是介词,在标题里如果不是第一个单词,不用capitalize。
我一般用这个在线工具验证 http://www.titlecapitalization.com/
``` | ||
docker build . -t ci | ||
``` | ||
## Build on a normal machine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Build on a normal machine
==> ### Update Go Dependencies
go get ./...
==> go get -u ./...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里跟#### Build docker image
是并列的关系,感觉改成#### Build Natively
更合适?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
或者我们列两种方式: build from source code 和 build Docker images ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
filename: ci.sh | ||
endpoint: http://87b93f06.ngrok.io | ||
``` | ||
## Start ci server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ci server ==> CI server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
endpoint: http://87b93f06.ngrok.io | ||
``` | ||
## Start ci server | ||
### Run using docker image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run using docker image ==> In Docker Containers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成了### Run In Docker Container
,没有用复数(s),因为我感觉是单个container。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
ci server template directory (default "/templates") | ||
``` | ||
|
||
# Generate personal access token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里有几个headings的深度需要调节一下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
ci server template directory (default "/templates") | ||
``` | ||
|
||
# Generate personal access token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generate personal access token ==> Generation Github Personal Access Token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generation Github Personal Access Token
感觉不是很通顺,改成了Github Personal Access Token Generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK!
cp ci_yaml_dir/ci.yaml . | ||
docker run -p 8000:8000 -v $(pwd):/data -v /var/run/docker.sock:/var/run/docker.sock ci | ||
``` | ||
#### Explanation: -v /var/run/docker.sock:/var/run/docker.sock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这几个explanations是不是用 enumerated list 更好?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好主意!done.
@wangkuiyi 大多数的按建议改了,有些我觉得改了之后不是很通顺或者跟我原意不一致的我comment了。请见comment。 |
关于介词在标题里的capitalization,我回复在 #22 (comment) 了。 LGTM! |
@wangkuiyi 明白了,谢谢!又按你的建议修改了下。另外把所有标题都到http://www.titlecapitalization.com/跑了一遍。 |
Fixes #10