Commit Graph

65 Commits

Author SHA1 Message Date
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
Frederic Branczyk d7575800b3
Merge pull request #5704 from simonpasquier/bump-promu
Bump promu to v0.5.0
2019-06-25 09:35:43 +02:00
Simon Pasquier b3ecdd3f75 Bump promu to v0.5.0
It also includes an update of RELEASE.md since this version simplifies a
bit the release process: promu will take care of drafting the GitHub
release.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-06-24 14:30:52 +02:00
Hrishikesh Barman f40e21bb6b added dockerfile path and build context (#5669)
Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>
2019-06-22 10:59:46 +02:00
Matthias Rampke ec7db0d541
Work around golangci-lint issues
The version on goreleaser is broken and different from the one in
Github: golangci/golangci-lint#575 – use the direct Github URL as a
workaround.

Additionally, the installer script attempts to `install -d /go/bin` on
CircleCI, which doesn't work due to permissions. Patch that line out –
we don't need it because we make sure the directory exists anyway.

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
2019-06-13 11:36:54 +00:00
Hrishikesh Barman 819205ed03 DOCKERFILE_PATH added to Makefile.common (#5635)
* added dockerfile path to Makefile.common

Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>
2019-06-06 14:36:57 +02:00
Simon Pasquier 20eb23e0ca
Makefile.common: use v0.4.0 of promu (#5559)
* Makefile.common: use v0.4.0 of promu

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

* Remove installation of github-release

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-05-14 14:49:09 +02:00
Simon Pasquier 45506841e6
*: enable all default linters (#5504)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-05-03 15:11:28 +02:00
Simon Pasquier f5d54e5be6
*: enable golangci-lint (#5437)
* *: enable golangci-lint

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

* Remove freebsd from supported platforms for lint

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

* Update CONTRIBUTING.md

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

* Update CONTRIBUTING.md

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

* Add common-staticcheck for compatibility

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-24 14:18:40 +02:00
Johannes Würbach 8dfd829fef Docker images for ARM32v7 and ARM64v8 (#5031)
Build and publish ARM32v7 and ARM64v8 docker images.

Signed-off-by: Johannes Würbach <johannes.wuerbach@googlemail.com>
2019-04-15 14:27:00 +02:00
Mario Trangoni 5354ffff99 Fix some spelling issues (#5361)
See,
$ codespell -S './vendor/*,./.git*,./web/ui/static/vendor*' --ignore-words-list="uint,dur,ue,iff,te,wan"

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2019-03-14 14:38:54 +00:00
Simon Pasquier 9f8e16248c
Makefile.common: run staticcheck for linux, freebsd and darwin only (#5331)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-14 09:47:36 +01:00
Simon Pasquier b0be270958
Makefile.common: add deps target (#5339)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-13 08:58:11 +01:00
Paul Gier d8c06bb2b7 Makefile.common: update promu to v0.3.0 (#5280)
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-02-28 19:00:49 +01:00
Krasi Georgiev 41dee81554
Makefile.common: add check_license by default. (#5236) 2019-02-19 13:25:10 +02:00
Simon Pasquier fc10f6d814
Unset GO111MODULE variable in Makefile.common (#5191)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-02-07 17:22:04 +01:00
Simon Pasquier f678e27eb6
*: use latest release of staticcheck (#5057)
* *: use latest release of staticcheck

It also fixes a couple of things in the code flagged by the additional
checks.

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

* Use official release of staticcheck

Also run 'go list' before staticcheck to avoid failures when downloading packages.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-04 14:47:38 +01:00
Paul Gier 1ca7037526 the go test -race option is only supported on amd64 (#4382)
Adds checks for current OS and arch to determine whether the '-race' option
should be used with go test

Signed-off-by: Paul Gier <pgier@redhat.com>
2018-12-19 11:28:26 +01:00
Paul Gier d55bd57bdc Makefile.common: fix promu download path for arm32 (#4998)
Signed-off-by: Paul Gier <pgier@redhat.com>
2018-12-18 16:20:43 +01:00
Simon Pasquier 56cda567d9 Makefile.common: fix format rule (#4918)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-12-06 12:49:47 +01:00
Simon Pasquier ac9d5f3d53
cmd/prometheus: replace glog by glog-gokit (#4931)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-12-04 15:01:12 +01:00
Ben Kochie e4a49f1a71
Update Makefile.common (#4932)
* Fixup PROMU unpack

When setting up promu, use an explicit path, not the `PROMU` variable.
This allows for Makefile override of the PROMU command line flags.

* Use temp dir for unpacking tools.
* Use BSD compatible tar command.
* OpenBSD mkdir doesn't support `-v`.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 16:20:50 +01:00
Julius Volz a8b8a8d5df
Fix .PHONE -> .PHONY typo in Makefile.common (#4886)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-11-20 17:17:48 +08:00
Simon Pasquier 5dce2f5853 Merge branch 'master' into go-modules
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-12 09:57:53 +01:00
Ben Kochie b1e779d0ed
Use release binary of promu (#4843)
Download and extract a release binary of promu, rather than pull from
master.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-10 16:28:59 +01:00
Simon Pasquier a9ff66427b Makefile: add precheck target
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 17:14:37 +01:00
Simon Pasquier a60d2c152f Makefile.common: clean up
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 11:55:04 +01:00
Simon Pasquier e3cd3ab79a Merge branch 'master' into go-modules
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 11:42:12 +01:00
Simon Pasquier 4fc6e22067 Set GO111MODULE when running staticcheck
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier 5bd9010196 More updates for libraries
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier be68fb0f30 Update Makefile.common to support libraries
Specifically tsdb and client_golang that don't use vendoring.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier 790876da60 go get honnef.co/go/tools/cmd/staticcheck in a temp dir
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier 71e0ec7512 improve unused recipe for go modules
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier 79e0fb5a3d Tidy up Makefile.common
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier ac16ef8f0e Add missing tools.go
Also rearrange the code to be more consistent.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00