Skip to content

Commit 21d0d9d

Browse files
committed
chore: buildkite
1 parent ba47d19 commit 21d0d9d

File tree

2 files changed

+16
-61
lines changed

2 files changed

+16
-61
lines changed

docs/content/docs/welcome/install/ci.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ include:
3636
3737
Note that you [can only reference components in the same GitLab instance as your project](https://docs.gitlab.com/ci/components/#use-a-component)
3838
39+
## Buildkite
40+
41+
Buildkite provides a [plugin](https://buildkite.com/resources/plugins/buildkite-plugins/golangci-lint-buildkite-plugin/) for running golangci-lint in Buildkite pipelines.
42+
43+
It utilizes the [Docker image of golangci-lint](/docs/welcome/install/local/#docker) by default, but can be set to use a binary if available on the agent.
44+
45+
The plugin will annotate builds with results, providing an easily readable summary of fixes.
46+
47+
```yaml {filename=".pipeline.yml"}
48+
plugins:
49+
- golangci-lint#v1.0.0:
50+
config: .golangci.yml
51+
```
52+
3953
## Other CI
4054
4155
Here are the other ways to install golangci-lint:
@@ -44,5 +58,3 @@ Here are the other ways to install golangci-lint:
4458
{{< card link="/docs/welcome/install/local/#binaries" title="Bash/Binaries" icon="archive" >}}
4559
{{< card link="/docs/welcome/install/local/#docker" title="Docker" icon="archive" >}}
4660
{{< /cards >}}
47-
48-

docs/content/docs/welcome/install/local.md

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,6 @@ title: "Local Installation"
33
weight: 2
44
---
55

6-
## CI installation
7-
8-
Most installations of golangci-lint are performed for CI.
9-
10-
It's important to have reproducible CI: don't start to fail all builds at the same time.
11-
With golangci-lint this can happen if you use option `linters.default: all` and a new linter is added
12-
or even without `linters.default: all` when one upstream linter is upgraded.
13-
14-
> [!IMPORTANT]
15-
> It's highly recommended installing a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases).
16-
17-
### GitHub Actions
18-
19-
We recommend using [our GitHub Action](https://github.com/golangci/golangci-lint-action) for running golangci-lint in CI for GitHub projects.
20-
21-
It's [fast and uses smart caching](https://github.com/golangci/golangci-lint-action#performance) inside,
22-
and it can be much faster than the simple binary installation.
23-
24-
Also, the action creates GitHub annotations for found issues (you don't need to dig into build log to see found by golangci-lint issues).
25-
26-
{{< cards cols=2 >}}
27-
{{< golangci/image-card src="/images/colored-line-number.png" title="Console Output" >}}
28-
{{< golangci/image-card src="/images/annotations.png" title="Annotations" >}}
29-
{{< /cards >}}
30-
31-
### GitLab CI
32-
33-
GitLab provides a [guide for integrating golangci-lint into the Code Quality widget](https://docs.gitlab.com/ci/testing/code_quality/#golangci-lint).
34-
A simple quickstart is their [CI component](https://gitlab.com/explore/catalog/components/code-quality-oss/codequality-os-scanners-integration), which can be used like this:
35-
36-
```yaml {filename=".gitlab-ci.yml"}
37-
include:
38-
- component: $CI_SERVER_FQDN/components/code-quality-oss/codequality-os-scanners-integration/golangci@1.0.1
39-
```
40-
41-
Note that you [can only reference components in the same GitLab instance as your project](https://docs.gitlab.com/ci/components/#use-a-component)
42-
43-
### Other CI
44-
45-
Here is the other way to install golangci-lint:
46-
47-
```bash
48-
# binary will be $(go env GOPATH)/bin/golangci-lint
49-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< golangci/latest-version >}}
50-
51-
# or install it into ./bin/
52-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< golangci/latest-version >}}
53-
54-
# In Alpine Linux (as it does not come with curl by default)
55-
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< golangci/latest-version >}}
56-
57-
golangci-lint --version
58-
```
59-
60-
On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
61-
62-
It is advised that you periodically update the version of golangci-lint as the project is under active development and is constantly being improved.
63-
For any problems with golangci-lint, check out recent [GitHub issues](https://github.com/golangci/golangci-lint/issues) and update if needed.
64-
656
## Linux
667

678
Golangci-lint is available inside the majority of the package managers.
@@ -128,6 +69,8 @@ The scoop package is not officially maintained by golangci team.
12869

12970
## Docker
13071

72+
The Docker image is available on [Docker Hub](https://hub.docker.com/r/golangci/golangci-lint).
73+
13174
```bash
13275
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{< golangci/latest-version >}} golangci-lint run
13376
```

0 commit comments

Comments
 (0)