Commit Graph

331 Commits

Author SHA1 Message Date
Miguel de la Cruz
182c29b456 MM-21898: Part 2. Add opentracing (#13904)
* initial implementation of opentracing

* app layer

* Revert Makefile

* .

* cleanup

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* [ci]

* autogenerate interface

* .

* missed vendor files

* updated interfaces

* updated store layers

* lint fixes

* .

* finishing layer generators and nested spans

* added errors and b3 support

* code review

* .

* .

* fixed build error due to misplased flag.Parse()

* code review addressed
2020-03-05 14:46:08 +01:00
Jesús Espino
7035e09fe9 Adding changes to separate unit tests and integration tests (#13670)
* Introducing unit (not integration) tests for the app layer

* Initial support for unit tests at the API

* Adding unit tests support to the store layer

* Add unit tests support in commands

* Adding last tests needed for run unit tests properly

* Fixing govet

* Removing some duplication

* Fixing tests

* Fixing tests

* Not compiling test helpers with the main module for api

* Revert "Not compiling test helpers with the main module for api"

This reverts commit 36a199bbe0.

* Fixing tests

* Fixing unit tests

* More consistency between api4/apiteslib.go and app/helper_test.go

* Renaming things to make more obvious the new Setup functions purpose

* Reverting change in go.sum

* Start with empty mock for app layer

* Start with empty mock for api layer

* Start with empty mock for web layer

* Renaming SetupWithStoreMockConfig to SetupConfigWithStoreMock

* Fixing tests on web package

* Removing unnecesary function
2020-03-02 08:13:39 -08:00
Agniva De Sarker
376ec9e0e3 Remove unnecessary struct2interface dependency (#13929)
* Remove unnecessary struct2interface dependency

Running go mod tidy on the repo removes it.
This was also preventing 1.14beta from running the repo,
because now it verifies modules.txt with go.mod, which had a mismatch.

* fixing CI

* Fix test-server target

* Fix some discrepancies in vendor

* Removing the Makefile target for now

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-27 09:46:13 +05:30
Jesse Hallam
7da85922af fix bin/mmctl detection using printf (#13898)
The behaviour of `echo` [varies](https://stackoverflow.com/questions/8467424/echo-newline-in-bash-prints-literal-n) between operating systems. Use `printf` for maximum compatibility.
2020-02-14 15:45:32 -05:00
Miguel de la Cruz
5f7b5686a8 Adds tFatal custom govet check (#13886)
Automatic Merge
2020-02-13 12:51:36 -05:00
Eli Yukelzon
17523fa5d9 MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)
* Generate and use an interface instead of *App
2020-02-13 13:26:58 +01:00
Jason Frerich
0a80e63668 Bump zoom plugin version to v1.3.0 (#13836)
Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-12 11:46:39 -06:00
Jason Paul Deland
28ef877876 (IS-302) Streamling process to download pre-built binaries (#13830)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir

* Streamlined script to find the correct latest version of an externally built binary from a GitHub Release

* Updated variable names to match

* Updating vars to match

* Updating parameters to named variables for clarity

* Update scripts/get_latest_release.sh

Co-Authored-By: Elisabeth Kulzer <elikul@elikul.de>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
2020-02-11 12:29:38 -05:00
Jason Deland
720de2bec3 mmctl should always be in the server bin directory 2020-02-04 16:40:09 -05:00
Jason Paul Deland
051fe3cd71 Updating process for mmctl to use DIST_PATH/bin (#13822) 2020-02-04 16:01:01 -05:00
Jason Paul Deland
acce0da068 Adding target to get the latest mmctl release from GitHub (#13770)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir
2020-02-03 16:58:15 -05:00
George Goldberg
d7206d2ede Update dependencies. (#13778) 2020-02-03 08:19:38 -08:00
Agniva De Sarker
f0934361a1 export GOBIN (#13752)
* export GOBIN

* Add comment
2020-01-27 13:34:35 +05:30
Ali Farooq
afd54413f7 MM-21769 - Validate plugin bundle and signature files when pac… (#13629)
* MM-21769 - Validate plugin bundle and signature files when packaging MM

* Renamed public key, using gpg exit code to verify success

* Update Makefile

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>

* Pulling platform specific prepackaged plugins

* Verify platform specific plugin binary exist when building each ARCH

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-01-22 13:39:02 -05:00
Agniva De Sarker
adeb7ec8ff Allow GOBIN to be overriden with environment variables (#13671) 2020-01-22 17:46:41 +05:30
Agniva De Sarker
5123fe0292 Remove more instances of GOPATH from Makefile and CI (#13450)
Automatic Merge
2020-01-21 07:49:49 -05:00
Jason Frerich
a001ecabe2 Update bundled plugins for v5.20 (#13621) 2020-01-15 10:30:58 -06:00
Jesús Espino
a3239ec464 adding inconsistentReceiverName check to vet task (#13582) 2020-01-07 14:48:33 +01:00
Ben Schumacher
81efef7b5a Don't lint EE code in TE CI (#13574)
* Don't lint EE code in TE CI

* Fix typo
2020-01-07 12:37:57 +01:00
Jesús Espino
68e0b1fdc2 Enforces structured logging in enterprise code (#13444) 2019-12-20 15:18:59 +01:00
Jesús Espino
b8ef62e502 Adding structuredLogging check and fix inconsistencies (#13370)
* Adding structuredLogging check and fix inconsistencies

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments
2019-12-16 13:57:21 +01:00
Jesús Espino
f55a81163e Adding mattermost-govet to the pipeline (#13257)
* Adding mattermost-govet to the pipeline

* Trying to fix circleCI config

* Trying to fix circleCI config

* Trying to fix circleCI config

* Trying to fix circleCI config

* Update Makefile

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* Update Makefile

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Adding legacy check-licenses task to legacy.mk

* Removing unnecesary GO111MODULE=off lines

* Adding jenkins mattermost-govet installation
2019-12-10 13:10:35 +01:00
Ben Schumacher
5122b9e292 [MM-20723] Add golint for plugin package to golangci (#13090) 2019-12-05 20:31:53 +01:00
Miguel de la Cruz
070ec77ee3 Fix the LDFLAGS references to use the version suffix (#13242) 2019-11-28 18:05:32 +01:00
Christopher Speller
0907530528 MM-20608 Updating x/crypto to support ACMEv2 (#13201)
* Updating x/crypto to support ACMEv2

* Revert test code.
2019-11-27 09:56:31 -08:00
Ben Schumacher
a1a2bb3130 Use predefined go command consistently (#13216) 2019-11-26 19:37:41 +01:00
Agniva De Sarker
e1adfb0d47 Run golangci-lint on EE packages if present (#13143)
The Go toolchain doesn't work with symlinks. Hence we need to explicitly
mention the directory name for it to work.
2019-11-25 18:54:54 +01:00
Agniva De Sarker
0f36649d22 Remove megacheck from Makefile (#13096)
Automatic Merge
2019-11-20 06:26:52 -05:00
Agniva De Sarker
4d1c6cd446 Remove GO111MODULE variable (#13130)
With 1.13, it is enabled by default on repos where a go.mod file is present.
2019-11-18 06:42:19 -08:00
Agniva De Sarker
3f072159e3 Remove fmt and vet checks from CI (#13063)
* Remove fmt and vet checks from CI

- golangci-lint already does the vet and fmt checks. Remove those
as it is redundant now.
- Also start running golangci-lint as part of the CI pipeline now
just as an extra layer of reliability.

* Incorporate review comments

* Adding golangci install to Jenkinsfile.pr too

* dummy commit to test jenkins

* Trying after cd to directory

* Fix ineffective assign
2019-11-18 12:08:13 +01:00
Carlos Tadeu Panato Junior
cdb61db9c4 add stop-docker to stop make command (#13020) 2019-11-12 08:32:06 +01:00
Andres
1155b08404 MM - 19155 Change plugin helpers files to be golint complied (#12686)
* MM-19155 Change plugin helpers files to be golint complied

* add makefile target that checks if plugin/helpers files are golint
  compliant

* MM-19155 - Change plugin helpers files to be golint complied

* added comment documentation to exported plugin/helpers methods
* changed variable names to be compliant with golint

* Address feedback
2019-11-12 06:29:21 +01:00
Lev
a7c1514d8e Bumped Zoom plugin to v1.1.2 (#13008)
* Bumped Zoom plugin version to 1.1.0

* Bumped Zoom plugin version to 1.1.1

* Bumped Zoom plugin to v1.1.2
2019-11-06 13:25:52 -08:00
Rodrigo Villablanca Vásquez
a39f4f1064 Change the minor version of go to 1.13 (#13015)
* Changed go minor version 12 -> 13

* REQUIREDGOVERSION set to 1.13.0
2019-11-06 07:04:50 -08:00
Ben Schumacher
0b24c336b3 Fix golangci-lint target (#12985) 2019-10-31 15:53:40 -05:00
Ben Schumacher
bc2b8b85fb Fix golangci-lint target for non GOPATH installations (#12934)
* Fix golangci-lint target for non GOPATH installations

* Link to https://github.com/golangci/golangci-lint#install
2019-10-30 12:48:51 +01:00
Paulo Bittencourt
7d0d7c304e MM-17888 Check plugin Helpers minimum server version comments (#12663) 2019-10-30 08:34:29 +01:00
Agniva De Sarker
3be92856b5 MM-19172: Add golangci-lint to the CI pipeline (#12909)
To start off with, we are using the new-from-rev=HEAD~ option which just checks the current
commit. This allows us to quickly integrate golangci-lint and not spend time in fixing all the
outstanding issues.

Things pending:
- Slowly fix the existing issues. To test them, just uncomment the "new-from-rev: HEAD~" line
from .golangci.yml and have at it.
- There are a number of unused functions and methods which are only invoked from enterprise code.
We are ignoring them for now because removing them will stop enterprise build from working.

The correct solution here is to use a build tag to separate TE and EE code. As a long term goal,
we would want to use that build tag throughout the EE codebase and remove the TE_PACKAGES and
EE_PACKAGES variables in the Makefile and just use the build tag. That makes things a lot cleaner
and avoids the need to spawn a "go list" every time to get the correct list of packages.
2019-10-26 09:12:07 +02:00
Agniva De Sarker
ee1f458bb1 Fix CI config (#12771)
* Fix CI config

- -mod=vendor flag was not being passed during the build stage, forcing
it to download everything again.
- Optimize the git clone of webapp with --depth=1 and use GIT_SSH_COMMAND to clone.
- Add $(GOFLAGS) to some other places which got missed out.

* Remove GOFLAGS from go list command

It does not work for Go 1.12. Need to fix later.
2019-10-17 18:38:21 +02:00
Lev
7239f8da60 Bumped Jira plugin version to 2.2.2 (#12770)
* Bumped the Jira plugin to v2.2.0

* Bumped Jira plugin version to 2.2.1

* Bumped Jira plugin version to 2.2.2

* Bumped Jira plugin version to v2.2.2
2019-10-14 20:36:56 -07:00
Lev
8dff860472 Bumped GitLab plugin version to 1.0.1 (#12406) 2019-10-11 06:09:38 -07:00
Lev
e095746987 Bumped Jira plugin version to 2.2.1 (#12689)
* Bumped the Jira plugin to v2.2.0

* Bumped Jira plugin version to 2.2.1
2019-10-08 16:34:00 -07:00
Lev
293d4c762e Bumped GitHub plugin to 0.11.0 (#12613) 2019-10-04 07:46:37 -07:00
Lev
54c4bef0d9 Bumped Zoom plugin version to 1.1.1 (#12403)
* Bumped Zoom plugin version to 1.1.0

* Bumped Zoom plugin version to 1.1.1
2019-10-03 10:22:30 -07:00
Lev
0186fdf9e7 Bumped Autolink plugin version to 1.1.1 (#12404) 2019-10-02 15:34:21 -07:00
Christopher Poile
f9025818b6 redirect stderr to stdout (#12516) 2019-10-02 19:23:25 +02:00
Lev
053ce34605 Bumped Welcome bot plugin version to 1.1.1 (#12407) 2019-10-02 10:09:22 -07:00
Lev
cc82cc990e Bumped Custom Attributes plugin version to 1.0.2 (#12405) 2019-10-02 09:35:01 -07:00
Lev
838f1de9e4 Bumped the Jira plugin to v2.2.0 (#12402) 2019-10-01 13:43:46 -07:00
Jesús Espino
89b7b2d99b Adding MM_NO_DOCKER env variable to Makefile (#12384)
* Adding MM_NO_DOCKER env variable to Makefile

* Making it consisten tiwh the previous IS_CI value
2019-09-30 20:50:56 +02:00