Commit Graph

32 Commits

Author SHA1 Message Date
Sofia Papagiannaki
de075e529d
Build: Fix potential case-insensitive import collision for github.com/Unknwon/com (#18915)
* update gopkg.in/macaron.v1

* update github.com/go-macaron/binding

* update github.com/go-macaron/session

* Substitute github.com/Unknwon/com with github.com/unknwon/com

* Clean up modules using `go mod tidy`

* Substitute github.com/Unknwon/bra with github.com/unknwon/bra
2019-09-09 14:22:06 +03:00
Oleg Gaidarenko
4b16cd6cc8
Build: Introduce shellcheck (#18081)
* Build: introduce shellcheck

Fixes #16198
2019-07-23 13:12:33 +03:00
Oleg Gaidarenko
8202fa2fde
Build: change definition of the vars in makefile (#18151)
Prompted by the @slim-bean talk (thanks!). With that definition
`GO_FILES` var can be dynamically changed, that will be very helpful
in grafana enterprise repo
2019-07-18 12:11:05 +03:00
Oleg Gaidarenko
b049b003f2 Build: allow dynamically change docker image (#18112)
* Build: allow dynamically change docker image

Right now, only for couple DBs.
With the 2.1, you can do `${TAG:-5.6}` without needing the `.env` file, but
it seems it would be better for back-compat to support `.env` right now.

Fixes #17891

* Build: add prefix for removal process

* Docs: mention makefile command instead of the bash

Since we are moving to makefile for things and make command
simplifies some of the actions you have to perform to work with
different environments

* Docs: mention dynamic tags in the docs

* Docs: avoid name collision

Fixes #16107
2019-07-16 08:16:10 +02:00
Oleg Gaidarenko
1cbec50866 Build: consistently reference go binary (#18059)
Before this applied, go binary is referenced inconsistently in makefile.
Sometimes with go modules enabled and sometimes not, sometimes through
a variable and sometimes not.

This change makes all the references in makefile consistent
2019-07-11 20:55:35 +02:00
Oleg Gaidarenko
caa1314f44
Build: use golangci-lint as a make command (#17739)
* Build: use golangci-lint as a make command

* Since gometalinter was deprecated in favor of golangci-lint so it was
  replaced by it. Responsibilities held by the gometalinter was moved to
  golangci-lint

* There was some changes in implementation (that was also mentioned in
  the code comment) between the tools, which uncovered couple errors
  in the code. Those issues were either solved or disabled by
  the inline comments

* Introduce the golangci-lint config, to make their
  configuration more manageable

* Build: replace backend-lint.sh script with make
2019-07-02 16:06:59 +03:00
Oleg Gaidarenko
bc7c420ee8
Build: make bra a local dependency (#17414)
Same idea as with the `gosec`, `revive` and etc.
Allows you to execute `make bra` as pinned local dependency instead
as global one. And therefore alleviates dependency installation issues.

README also updated - I was thinking to provide verbose installation instructions
for it. Since with that way we assume make is installed on the
developer system.

But it might be premature right now?
2019-06-07 16:42:08 +03:00
Oleg Gaidarenko
f43af0e644
Build: specify build flag for docker-compose up (#17411)
Otherwise changed data will not get refreshed to the previous
state.

Which I think is not evident (unless you are familar with docker-compose).
and therefore error-prone (at least it did for me)
2019-06-03 21:09:29 +03:00
Carl Bergquist
d8736a2547
Alerting: golint fixes for alerting (#17246) 2019-06-03 10:25:58 +02:00
Oleg Gaidarenko
a1a498f96c
Build: ignore absence of docker-compose (#17331)
If devenv/docker-compose.yaml file is missing, `devenv-down`
and subsequently `devenv` is not going to work
2019-05-28 20:08:27 +03:00
Oleg Gaidarenko
9ff44b5037
Build(makefile): improve error handling (#17281)
* Build(makefile): improve error handling

Ref baa55ab6ae
2019-05-28 19:32:14 +03:00
Oleg Gaidarenko
baa55ab6ae
Feature: do dev environment via makefile (#17136)
Simplifies dev environment creation. I also planing to utilize
this logic for the LDAP benchmarking
2019-05-25 04:38:01 +03:00
Oleg Gaidarenko
be66ed9dab
Chore: explore possibilities of using makefile (#17039)
* Chore: explore possibilities of using makefile

This is an exploratory commit - I wanted to see how
revive/gosec linters could be integrated with makefile and our build scripts.

Looks better then I expected :)

* Chore: make revive happy

Revive execution was not supplied with path, if you restore there is couple
errors that were popping up - so I fixed them

* Chore: make revive happy
2019-05-16 00:29:26 +03:00
Carl Bergquist
68f5ddf18c
replace dep with go modules (#16017)
- guide shamelessly stolen from prometheus/prometheus
- updates local interface of oauth exchange
- updates local impl of hclogger
- bump jaeger client version

closes #16088
2019-04-16 12:00:55 +02:00
Oleg Gaidarenko
04b3afcd15
Chore: Implement revive (#16200)
Since we do not like some of the default golint rules,
this commit proposes to use https://github.com/mgechev/revive.

And potential revive speed-up should't hurt :).

Right now, presented config (./conf/revive.toml) is permissive,
we might improve it over time however. Fixes for found revive
issues in the code are very limited so it wouldn't be large to review.

Also in this commit:

* Add annotations for makefile commands and declare phony targets

* Rename "gometalinter" script and CI command to "lint"
  since we are doing there a bit more then using gometalinter package

* Add Makefile rules to .editorconfig

* Documentation which mentioned "golint" replaced with revive

Fixes #16109
Ref #16160
2019-03-27 17:53:49 +01:00
Leonard Gram
2e8c4699b0 build: internal metrics for packaging. 2018-11-15 14:42:09 +01:00
David Kaltschmidt
a4ef1d6175 Makefile: dependency-driven target to build node_modules
- added `node_modules` as new target
- dependency on `package.json` and `yarn.lock` allows for quick `make
  node_modules` after a branch change, which noops when the deps have
 not changed
- also added `clean` target
2018-10-29 11:08:30 +01:00
bergquist
2936e34d75 removes protoc from makefile 2018-09-11 10:53:21 +02:00
Dan Cech
96d6657b00 produce an image compatible with grafana-docker 2018-08-09 09:10:53 +02:00
Leonard Gram
0ff54d257a build: makes it easier to build a local docker container. 2018-08-03 09:40:02 +02:00
David Kaltschmidt
c3cc60b080 Support for local Docker builds
* add a git-ignored `local/` folder for Makefile/Dockerfile
* import `local/Makefile` to root Makefile
* add `.dockerignore`
2018-05-07 12:32:18 +02:00
Dan Cech
338655dd37
move Context and session out of middleware 2018-03-06 18:16:49 -05:00
bergquist
9e942f1a6d Adds Tables types to protobuf 2018-01-11 15:34:07 +01:00
bergquist
a2d47427ba separate plugin impl and proto files 2017-12-07 16:33:36 +01:00
bergquist
3c0f61511d build: deps-go is not required for building grafana
setup compiles the backend and caches it which is nice
when developing grafana since incremental compiles are
much faster. But its not required for building grafana.
2017-02-16 09:10:55 +01:00
bergquist
2ad2b96133 build: avoid progress bar update on yarn install
this will save us ~100TB of unneeded data in the long term.
2017-02-13 15:26:10 +01:00
bergquist
60a2041065 tech(build): yarn install should use --pure-lockfile 2017-01-12 15:36:44 +01:00
Carl Bergquist
e61d049623 tech(build): replace npm with yarn (#7108)
* tech(build): replace npm with yarn

* tech(build): change node version for CI
2017-01-06 07:28:43 +01:00
Dan Cech
6b16fcea52 Oauth2 Updates (#6226)
* break out go and js build commands

* support oauth providers that return errors via redirect

* remove extra call to get grafana.net org membership

* removed GitHub specifics from generic OAuth

* readded ability to name generic source

* revert to a backward-compatible state, refactor and clean up

* streamline oauth user creation, make generic oauth support more generic
2016-10-11 08:51:44 +02:00
bergquist
d3a5d5c058 tech(build): update makefile 2016-09-15 13:02:16 +02:00
Dan Cech
650bb4c719 use npm test to run npm tests 2016-04-25 12:53:15 -04:00
Dan Cech
2244224b12 add basic Makefile, remove need for global grunt-cli 2016-04-25 12:44:26 -04:00