Skip to content
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

Merged
merged 5 commits into from
Dec 14, 2016

Conversation

helinwang
Copy link
Collaborator

@helinwang helinwang commented Dec 14, 2016

Fixes #10

Copy link
Owner

@wangkuiyi wangkuiyi left a 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
Copy link
Owner

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"
Copy link
Owner

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
Copy link
Owner

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

Copy link
Collaborator Author

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
Copy link
Owner

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 比较好。

Copy link
Collaborator Author

@helinwang helinwang Dec 14, 2016

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

Copy link
Owner

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
Copy link
Owner

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 ./...

Copy link
Collaborator Author

@helinwang helinwang Dec 14, 2016

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更合适?

Copy link
Owner

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 ?

Copy link
Collaborator Author

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci server ==> CI server

Copy link
Collaborator Author

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
Copy link
Owner

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

Copy link
Collaborator Author

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。

Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里有几个headings的深度需要调节一下。

Copy link
Collaborator Author

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
Copy link
Owner

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

Copy link
Collaborator Author

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

Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这几个explanations是不是用 enumerated list 更好?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好主意!done.

@helinwang
Copy link
Collaborator Author

helinwang commented Dec 14, 2016

@wangkuiyi 大多数的按建议改了,有些我觉得改了之后不是很通顺或者跟我原意不一致的我comment了。请见comment。
然后请问标题的名称什么时候首字母大写?为什么是### Build from Source Code,而不是### Build From Source Code,或者### Build from source code。另外,请问### Run binary built on normal machine这个大小写应该怎么改?(还是保持不变)?

@wangkuiyi
Copy link
Owner

关于介词在标题里的capitalization,我回复在 #22 (comment) 了。

LGTM!

@helinwang
Copy link
Collaborator Author

@wangkuiyi 明白了,谢谢!又按你的建议修改了下。另外把所有标题都到http://www.titlecapitalization.com/跑了一遍。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants