Commit Graph

99 Commits (a48d05912d80e03532d1883a492e7e8de21a1786)

Author SHA1 Message Date
Arve Knudsen 89bbb885e5
Upgrade to golangci-lint v1.62.0 (#15424)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-11-20 17:22:20 +01:00
Ben Kochie 628bbd2682
Update linting (#15369)
* Ignore all node_modules dirs.
* Update Makefile.common golangci-lint to match CI pipeline.

Signed-off-by: SuperQ <superq@gmail.com>
2024-11-12 13:27:39 +01:00
51n15t9r b6015e7c73
Add support for running govulncheck (#12654)
* Add support for running govulncheck

---------

Signed-off-by: 51n15t9r <utkarsh.khare@gmail.com>
2024-09-16 23:13:04 +02:00
Arve Knudsen fbcd50f32c Upgrade golangci-lint to v1.60.2
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-08-21 18:57:17 +02:00
Arve Knudsen 3a78e76282 Upgrade golangci-lint to v1.60.1
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-08-18 12:13:25 +02:00
Arve Knudsen 0395b04419 golangci-lint: Upgrade to v1.59.1
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-06-24 16:14:22 -07:00
Arve Knudsen b2396c0c8f Upgrade to golangci-lint v1.59.0
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-05-27 22:38:48 +02:00
SuperQ f09cf2d9fb
Update promu
Update promu to the latest release.

Signed-off-by: SuperQ <superq@gmail.com>
2024-05-02 00:10:02 +02:00
heyitao d9e4353520 Fix binary detection in Makefile
Signed-off-by: heyitao <heyitao@uniontech.com>
2024-03-21 11:32:23 +08:00
dongjiang 11fc7b1d83
chores: bump to golangci-lint v1.56.2 (#13753)
bump to golangci-lint to v1.56.2

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-03-19 19:24:37 +01:00
SuperQ 2061eb0a6a
Add GitHub action to publish container README
Add a GitHub action to publish the README.md to Docker Hub and Quay.io.

Fixes: https://github.com/prometheus/prometheus/issues/5348

Signed-off-by: SuperQ <superq@gmail.com>
2024-03-12 14:18:52 +01:00
machine424 6998bfab59
add a common-lint-fix make target to make golangci-lint fix found issues if it's supported by the linter
clean up common-lint target

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-03-06 12:06:02 +01:00
Arve Knudsen 7d7787f250 Makefile: Support golangci-lint on ARM64
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-02-06 13:51:16 +04:00
Matthieu MOREL 9c4782f1cc
golangci-lint: enable testifylint linter (#13254)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-12-07 11:35:01 +00:00
michalbiesek d1ff3eb868
Update golangci-lint (#12688)
Signed-off-by: Michal Biesek <michalbiesek@gmail.com>
2023-09-01 12:15:54 +02:00
SuperQ 4edf8999da
Update promu
Update promu to support riscv64.

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-06 10:59:03 +02:00
SuperQ c18f5b6487
Update golangci-lint
* Update golangci-lint to v1.53.3.
* Update the sync script handler for the old golanci-lint action.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-27 14:21:39 +02:00
Bartol Deak 95b7d592ba
rewrite `which` with `command -v`
Signed-off-by: Bartol Deak <b@bdeak.net>
2023-06-13 11:59:17 +02:00
Bartol Deak 06843db80a
Hide `which` stderr output
Signed-off-by: Bartol Deak <b@bdeak.net>
2023-06-12 23:00:04 +02:00
SuperQ f14665b9e3 Fix docker tag sanitizer
Use a `-` instead of `_` to make the docker tag also pass semver checks.

Signed-off-by: SuperQ <superq@gmail.com>
2023-03-21 11:27:25 +01:00
Julien Pivotto 331a7dfd21 Replace '+' with '_' in docker image tag for semver compatibility
This change introduces a new variable, SANITIZED_DOCKER_IMAGE_TAG, which
replaces any '+' characters in the original DOCKER_IMAGE_TAG with '_'
characters. This ensures better compatibility with semver standards,
particularly when using metadata in version tags.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-16 20:31:17 +01:00
SuperQ 65e743719c
Update golangci-lint
Update to the latest release, supports Go 1.20.

Signed-off-by: SuperQ <superq@gmail.com>
2023-02-20 11:17:22 +01:00
Luca Comellini 3e09fd32bb
Bump golangci-lint to v1.50.1
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-12-21 18:35:11 -08:00
Julien Pivotto a971bdd5f5 Do not build with netgo on Windows
Fix #11480

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-12 12:33:18 +01:00
Julien Pivotto 96d5a32659
Update go to 1.19, set min version to 1.18 (#11279)
* Update go to 1.19, set min version to 1.18

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* Update golangci-lint

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-07 11:30:48 +02:00
Julien Pivotto a703f9814b
Go back to docker build (#11263)
Docker build alone works with tags, where buildx did not seem to tag
properly.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-06 14:30:22 +02:00
Julien Pivotto fc1a36d476
Fix docker images publishing (#11260)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-06 12:27:31 +02:00
Julien Pivotto 8f3bcfac93
Move to github actions (#11235)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-05 23:09:41 +02:00
Augustin Husson f609b7bbcc
remove GO111MODULE and GOVENDOR usage (#10836)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-06-13 13:08:59 +02:00
Sylvain Rabot c31a3e4c92
Build with Go 1.18 (#10501)
* Build with Go 1.18
* Update golangci-lint version

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2022-03-31 00:16:54 +02:00
Łukasz Mierzwa a4317bf0ec
Run gofumpt on all files (#10392)
* Run gofumpt on all files

Getting golangci-lint errors when building on my laptop, possibly because I have newer version of gofumpt then what it was formatted with.
Run gofumpt -w -extra on all files as it will be needed in the future anyway.

* Update golangci-lint to v1.44.2

v1.44.0 upgraded gofumpt so bumping version in CI will help keep formatting correct for everyone

* Address golangci-lint error

Getting 'error-strings: error strings should not be capitalized or end with punctuation or a newline' from revive here.
Drop new line.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2022-03-03 17:21:05 +01:00
Julien Pivotto b48a1e9e9b
Revert "Replace vfsgen with embed for static web assets (#9719)" (#9870)
This reverts commit ddaddc2a7a.
2021-11-26 10:11:26 +01:00
Jan Fajerski ddaddc2a7a
Replace vfsgen with embed for static web assets (#9719)
* remove vfsgen usages

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* web: use embed package for static assets

This requires go 1.16.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* circleci: drop go generate in web/ui

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* Makefile: compress web assets before build

This commit add compression before (and decompression after) prometheus
is build. This ensures that gzipped assets are embeded in the prometheus
binary, if the builtinassets build tag is passed. If the build tag is
not passed this step is still executed but has no effect.
All this is executed in a subshell so that we can run the decompress
step even if the build step fails, but retain the exit code of promu.
This cleanup could also cover interrupts, but I left that out for now.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* [FIXME]: add new module dependency on common/assets and temp replace

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-11-25 15:04:51 +01:00
Julien Pivotto c564984daa
Reduce Prometheus pull requests builds (#9666)
* Reduce Prometheus builds

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-11-09 00:02:23 +01:00
SuperQ 5b75a97b2c
Use download mode for update-go-deps
Add `-d` to go get to avoid trying to build/install packages when
running `make update-go-deps`. Tested with 1.14.

Signed-off-by: SuperQ <superq@gmail.com>
2021-10-22 10:32:03 +02:00
Levi Harrison cc77593176
Switch golangci-lint to GitHub Actions (#9232)
* Added golangci-lint action

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-10 16:30:18 +02:00
Levi Harrison b7d2f4e189
Only run if yamllint is installed
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-06-25 08:03:58 -04:00
Michal Wasilewski cd0281e766
Adds yamllinting to Makefile.common
* adds yamllint target to Makefile.common for use by all Prometheus projects

Signed-off-by: Michal Wasilewski <mwasilewski@gmx.com>
2021-06-12 11:17:59 +02:00
Ben Kochie a06dcd7771
Update Makefile.common
* Bump promu to latest release.
* Bump golangci-lint to latest release.
* Add nolint to intentional error.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-04-13 09:33:45 +02:00
Julien Pivotto c1f203a1b8 Use CircleCI parallelism
This commit uses the CircleCI parallelism features, combined with the
last changes in promu that enables this.

Now all the pull requests will be built with all the platforms again, in
less than 20 minutes.

A side effect is that we now build Prometheus for 7 more os/arch combos:
darwin-arm64 / illumos-amd64 / linux-mips / linux-mipsle /
freebsd-arm64 / netbsd-arm64 / openbsd-arm64

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-21 12:17:20 +01:00
Ben Kochie 35b49230eb
Speed up PR builds
* Update to latest promu.
* Split up builds for PRs into a build matrix.
* Keep non-matrix build pipeline for releases.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-17 21:16:13 +01:00
Marcelo E. Magallon 75d86c6747 Update golangci-lint to 1.36.0
In the previous version, 1.18.0, the "megacheck" linter paid attention
to the '//lint:ignore' comment, but that is no longer there.

Newer version pay attention to '//nolint:<linter>,<linter>,...'
comments, optionally followed by a "second" comment introduced by '//'.

Update the directives to use this style.

This is related to prometheus/blackbox_exporter#738 and
prometheus/blackbox_exporter#745.

Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
2021-02-04 08:53:33 -06:00
Tobias Schmidt 4ee2e1fd93
Install promu v0.7.0 (#8148)
Will start producing ZIP archives for Windows releases in addition to tarballs.

Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
2020-11-04 00:33:59 +01:00
Victor Araujo 74775d7324
Add major version tag (#8026)
When the latest tag is added, also add a tag for the major version
when the version tag matches the latest release defined in VERSION.

Signed-off-by: Victor Araujo <vear91@gmail.com>
2020-10-22 17:19:44 +02:00
Ben Kochie 7b4a2ca870
Bump promu version (#7880)
Upgrade to promu 0.6.0.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-09-02 17:03:52 +01:00
Simon Pasquier 44cdd3e768
Makefile.common: add 'update-go-deps' target (#7259)
* Makefile.common: add 'update-deps' target

Also updated the RELEASE.md document to adjust the instructions about
dependencies management.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Rename udpdate-deps -> update-go-deps

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Remove use of jq

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Use $(GO) instead of literal "go"

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-05-18 11:43:45 +02:00
Simon Pasquier 46129fdebb
Makefile.common: use gotestsum if present (#4792)
Using gotestsum with CircleCI, we can gain more insights on failing
tests.

See https://circleci.com/docs/2.0/collect-test-data/ and
https://circleci.com/blog/level-up-go-test-with-gotestsum/ for more
details.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-02-24 11:50:05 +01:00
Simon Pasquier 337a1fbffd
Bump golangci-lint to v1.18.0 (#6004)
It is required to support Go 1.13 (see
https://github.com/golangci/golangci-lint/issues/652).

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-09-10 17:40:08 +02:00
Hrishikesh Barman 78a9b474d2 building individual binaries with make build (#5966)
* building individual binaries

Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>
2019-08-29 13:11:49 +03:00
Simon Pasquier 8624913a34
Bump golangci-lint to v1.17.1 (#5778)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-07-19 09:14:33 +02:00