Commit graph

76 commits

Author SHA1 Message Date
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
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