# CircleCI

## 官网地址

{% embed url="<https://circleci.com/>" %}

## 流水线

首先在代码仓库中创建`.circleci`目录，并在其中创建流水线配置文件`config.yml`。文件内容如下：

{% code title=".circleci/config.yml" %}

```yaml
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
  build:
    docker:
      - image: circleci/golang:1.12
    steps:
      - checkout
      - run: go build
```

{% endcode %}

将更新提交到代码仓库中，在配置完代码仓库账号绑定后，在CircleCI管理控制台左侧菜单点击`Add Projects`添加项目，选择要开启持续集成的仓库点击右侧按钮`Set Up Project`，在新页面中选择操作系统`Linux`和语言`Go`，点击下方`Start Building`。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://golang-2.gitbook.io/handbook/xiang-mu-guan-li/chi-xu-ji-cheng/circleci.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
