Граф коммитов

128 Коммитов

Автор SHA1 Сообщение Дата
Amy Blais
28983fa88d Update Dockerfile (#16118)
Automatic Merge
2020-10-29 08:54:01 -04:00
Mario de Frutos Dieguez
bb095c2a1a mmctl is not being included in the package (#16105)
It's was including it in the bin folder but when we package we need to include it in the dist/bin so right now the `download_mmctl` script accepts a second parameter to define the path where the binary is going to be stored
2020-10-28 13:59:49 +01:00
Elisabeth Kulzer
8c63eb7232 DOPS-243: Add manifest.txt (#15959)
* DOPS-243: Add manifest.txt

* Update build/release.mk

* Change path

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-23 09:41:33 +02:00
Jason Paul Deland
e280aa1c63 Update to get latest release from S3 (#15952)
* Update to get latest release from S3

* Update mmctl to download to use S3

* Download MMCTL from S3

* Update download_mmctl_release.sh

* Update Makefile

* Update release.mk

* Update the script called, remove call to sub shell and clean up indentation

* Add quotes around THIS_BRANCH var

* Update script to support overriding the OS for packaging

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-16 20:27:50 -04:00
Elisabeth Kulzer
b9f8d24cbc Move environment variables to env-file (#15820) 2020-10-08 11:24:16 +02:00
Elisabeth Kulzer
14fe307436 Add healthcheck to docker-compose databases to easier debug (#15735)
* Waiting for postgres to startup before tests

* Add healthcheck

* Test postgres default

* Prefer pgisready command

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-02 12:32:23 +02:00
Carlos Tadeu Panato Junior
c2554dc30e bump the package placeholder to use the latest mm package release (#15688) 2020-10-01 13:50:26 +02:00
Ashish Bhate
ee76ad435b [MM-28303]: check if mmctl exists before checking on Github and reduce requests to Github (#15387)
Summary:
Every make call would ping Github to find out the mmctl version to download. Each check made 4 requests to Github. So every make execution resulted in 4 requests to Github. This leads to frequent rate-limit errors from Github.
In this PR we check for the mmctl version only if mmctl doesn't already exist. We also print a more helpful error message.
Reduce the number the number of requests to Github from 4 to 2.

Ticket Link:
https://mattermost.atlassian.net/browse/MM-28303
2020-09-24 14:54:57 +05:30
Jason Paul Deland
1be5512655 Remove check on MMCTL Value 2020-09-02 16:59:08 -04:00
Carlos Tadeu Panato Junior
3fc9ed9871 image: bump default MM package to use release 5.26.0 (#15276) 2020-08-19 14:23:47 +02:00
Agniva De Sarker
e1ca3e348f MM-27512: Use an authenticated user to bump up request rate limit (#15251)
* MM-27512: Use an authenticated user to bump up request rate limit

An unauthenticated user can only make 60 requests per hour which means 1
request every minute. This can lead to frequent rate limit errors while
getting the latest release.

We change that to use an authenticated user which is already available
in the CI. This moves us to make 5000 requests per hour.

We also add additional logging in the Makefile targets in case
the command fails again so that it's clear what has happened, and not return
cryptic 404 errors again.

Ideally, we should be able to inspect the output of the curl command, but since
the output value of the entire bash script is fed into the variable, it is a bit
difficult to print debug output.

If this still gives error, then we need to either use a cached artifact somehow
or add additional logging and add a retry logic on top of it.

* fix mistake
2020-08-18 19:42:12 +05:30
Agniva De Sarker
ac26555cdb MM-27735: Do not build test and other tools in CI (#15238)
Our codebase uses main_test.go files to control tests at a package level.
However, the problem with that is when we use ./... to build the codebase,
those binaries also get built.

This is unnecessary and creates further delays in the pipeline. All we need to build
are only mattermost and platform binaries in CI. The rest are dependant on the developer.

In my dev environment, this reduces the build times from 13 seconds to 4 seconds.

https://mattermost.atlassian.net/browse/MM-27735
2020-08-13 19:40:15 +05:30
Elisabeth Kulzer
94ee1fa5c6 IS-255: Test and remove code for creating enterprise docker image. (#14395)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-08-03 11:23:45 +02:00
Agniva De Sarker
9bfc5de44c MM-26584: Bump up Go patch version (#15156)
* MM-26584: Bump up Go patch version

This contains a patch fix for https://github.com/golang/go/issues/38023
which have been encountered in our load tests and some users.

I have verified on such a stuck instance and the thread dump seem to match
with what is seen on the issue. All threads stuck on runtime.futex, except one,
which is at runtime.osyield.

And of all the times load tests were run which _did not_ show this issue,
it was run with a version greater than 1.14.1, which further points to the
theory that this bug is the culprit.

* Replace docker image versions.

* Update build/README.md

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-08-01 00:08:04 +05:30
Carlos Tadeu Panato Junior
ed3c93716d docker: update base package to use MM release 5.25.2 (#15153)
Automatic Merge
2020-07-31 15:40:16 +02:00
Jesús Espino
e980dd7bd3 Configurable dev environment (#14869)
* Configurable dev environment

* Add a bit of documentation

* fixing gofmt

* A bit more doc

* Using  variable

* Adding license header

* Moving LDAP_DATA variable to the default-config.mk file

* Adding another docker-compose for the makefile to not brake anybody workflow

* Moving dejavu to the config

* Fixing docker-compose.makefile.yaml for dejavu

* Adding keycloak support to the dev environment

* Address PR review comments

* Removing minio from default docker images

* Changing the default version of mysql to the oldest supported (5.6)

* Change the restart option to no for the dev environment

* Fixing restart option

* Reverting unneded changes

* Restoring 5.7 to check if test passes

* Going back to 5.6 mysql image

* Fixing tests on mysql 5.6

* Skipping flaky test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-13 22:29:39 +02:00
Carlos Tadeu Panato Junior
10af90fa27 Update Dockerfile (#14946)
* update alpine base image to 3.12

* update MM package to use 5.24.2 as default
2020-06-30 14:45:17 +02:00
Elisabeth Kulzer
7d1aad9822 Revert "Docker compose network (#14771)" (#14782)
This reverts commit 91f1c47ba3.
master is broken because of this. Skip tests.
2020-06-09 09:56:47 +02:00
Elisabeth Kulzer
91f1c47ba3 Docker compose network (#14771)
* Updating to use a different network cidr for the mm-test network

* Update docker-compose.yaml

Remove gateway as its not needed and caused problems before

Co-authored-by: Jason Deland <jaydeland@gmail.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Jason Paul Deland <9366595+jaydeland@users.noreply.github.com>
2020-06-09 09:00:09 +02:00
Carlos Tadeu Panato Junior
c2f171af07 dockerfile: bump base MM package to 5.23.1 (#14757)
Automatic Merge
2020-06-05 05:02:16 -07:00
Seweryn Zeman
853e955b62 Change Dockerfile HEALTHCHECK intervals (#14317)
We should not use such a long `HEALTHCHECK` `--interval` as first task check if happening after given time, and before healthcheck returns `0` – **task won't be available** to the Docker networks – meaning that Mattermost won't work until then even if it deployed correctly!

And in Docker envs it happens often – that DB is available all the time, and just MM app is being updated. In this case even if we are healthy since 1s – we need to wait 5min until it goes online.
2020-05-27 17:19:43 +02:00
Jason Blais
235c53189e Add ?src=docker query parameter to identify download source (#14577)
Automatic Merge
2020-05-25 04:29:18 -07:00
Agniva De Sarker
4fe52d677c MM-24652: Bump golangci to 1.25.1 (#14409)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-05-12 10:36:58 +05:30
Carlos Tadeu Panato Junior
4c16924832 bump base package for MM in dockerfile (#14468) 2020-05-05 18:43:12 +02:00
Mario de Frutos Dieguez
9783294e97 Include dejavu in docker compose (#14329)
* Include dejavu in docker compose
2020-04-21 20:48:04 +02:00
Carlos Tadeu Panato Junior
176db1e189 dockerfile: set 5.22.0 version (#14309) 2020-04-18 11:00:13 +02:00
Agniva De Sarker
1f036b7588 Jenkins: Make mysql and postgres tests run in parallel (#14026)
* Jenkins: Make mysql and postgres tests run in parallel

* Trying again

* Start docker containers individually for each stage

This is because the parallel block does not allow
a common step to be specified.

* Giving a random name to each docker-compose

* Fixing order of the param

* Giving unique project names for tests

* Setting the right datasource and drivername

* Trying to use different copies of the src directory for test the databas3

* moving workspace copy to the beginning of postgres tests

* Fixing some missed out patches

* Added missing LDAP population command

* Upload all test results

And set allowEmptyResults to false.

* Pruning remaining docker networks

* Remove unneeded settings

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2020-04-08 23:22:58 +05:30
Carlos Tadeu Panato Junior
22a00104bd update dockerfile to use the latest release available (#14232)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-04-07 15:25:15 +02:00
Elisabeth Kulzer
27a0ff4d52 Revert "Updating to use a different network cidr for the mm-test network (#14223)" (#14247)
This reverts commit d1d1e3d27a.
2020-04-07 12:57:24 +02:00
Jason Paul Deland
d1d1e3d27a Updating to use a different network cidr for the mm-test network (#14223)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-04-06 12:45:11 -04:00
Elisabeth Kulzer
0340eb466f IS-364: Bump golang build image. (#14134)
* IS-364: Bump Golang CI.

* Fix test failure

* Fix readme

* Update build/README.md

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2020-03-25 12:36:06 +01:00
Elisabeth Kulzer
6c6a64c103 Revert "IS-364: Bump Golang CI. (#14123)" (#14133)
This reverts commit 81d6ae2207.
2020-03-24 14:01:49 +01:00
Elisabeth Kulzer
81d6ae2207 IS-364: Bump Golang CI. (#14123)
IS-364: Bump Golang CI.
2020-03-24 08:45:26 +01:00
Agniva De Sarker
f42d3c83f3 MM-22710: Bump golangci to 1.23.6 (#13948)
* MM-22710: Bump golangci to 1.23.6

This is to prepare the codebase for 1.14 shift.

1.23.6 has some fixes which is necessary for a codebase using Go 1.14.

* Remove golangci service

The service is getting shut down.
https://medium.com/golangci/golangci-com-is-closing-d1fc1bd30e0e

* Remove unneeded comment

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-03-16 22:46:32 +05:30
Jesús Espino
69b29476d5 Running tests in mysql and postgres (#13832)
* Running tests in mysql and postgres

* Fixing ci

* Fixing ci

* Fixing ci

* Fixing ci

* Fixing ci

* Fixing ci

* Fixing ci

* Fixing ci

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-28 18:50:22 +01:00
Agniva De Sarker
bd487418f7 golangci: bring back the unused linter (#13826)
https://github.com/golangci/golangci-lint/issues/885 is fixed wth 1.23.3.
We can now bring back unused.
2020-02-15 10:53:16 -05: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
Jesús Espino
596f986755 Switch to Postgres when running tests and turn off the fsync setting (#13678)
* Run all tests fasts in postgres

* Moving postgres config to a file

* Addressing PR review comments

* Testing against mysql in the CI to keep things less changed

* Revert "Testing against mysql in the CI to keep things less changed"

This reverts commit fc940c111db269a821c54e005d76df87cb70e031.

* Fixing a test broken in postgres but working in mysql

* Fixing some tests

* Fixing some config tests with postgres

* Fixing the rest of config tests

* Fixing govet error

* Fixing search tests for postgres
2020-02-06 15:15:18 +01:00
Carlos Tadeu Panato Junior
55b646ecf8 retain the logs for more builds (#13645) 2020-02-06 13:26:36 +01: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
Elisabeth Kulzer
3049378506 Add 5.20 method to release branches for adding GOBIN. (#13785) 2020-01-28 19:59:47 +01:00
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
5123fe0292 Remove more instances of GOPATH from Makefile and CI (#13450)
Automatic Merge
2020-01-21 07:49:49 -05:00
Ben Schumacher
ca140117d8 Bump GolangCI-Lint to v1.23.0 (#13628) 2020-01-21 09:46:11 +01:00
Maria A Nunez
87eb7697f9 MM-19606- Rework Prepackaged Plugins (#13449)
* MM-19609 - Add new prepackage configuration settings (#13062)

* Add signatures to the prepackaged plugins (#13138)

* MM-19612 - Support querying local plugin marketplace when upst… (#13250)

* MM-19612 - Support querying local plugin marketplace when upstream unavailable or disabled

* Update translations file

* Fixed comment

* Updated to check EnableRemoteMarketplace setting and LocalOnly to get marketplace plugins

* Fixed unit tests

* Tests cleanup code

* Removed unused error message

* Updated tests

* MM-19614- Updated Marketplace Service error id (#13388)

* [MM-19610] Consume prepackaged plugins (#13005)

* consume prepackaged plugins into memory

* missing i18n

* remove spurious .gitignore changes

* return on failure to install prepackged plugins

* cleanup

* s/plugins/availablePlugins

* whitespace

* don't return extractDir when not needed

* s/plug/plugin

* error on icon, cleanup

* update armored version of testplugin signature

* honour AutomaticPrepackagedPlugins

* document getPrepackagedPlugin

* MM-19613 - Include prepackaged plugins in marketplace results (#13433)

* Added prepackaged plugins to marketplace results

* PR Feedback

* PR Feedback

* Update error where definition

* Removing unnecessary var declaration

* Updated comments

* MM-21263 - Use EnableRemoteMarketplace in marketplace install… (#13438)

* MM-21263 - Use EnableRemoteMarketplace in marketplace install endpoint

* Call updateConfig before calling NewServer in TestHelper

* Added translations

* PR feedback

* Translations

* Feedback

* s/helpers.go/download.go

* Converging env.PrepackagedPlugins

* Initial PR feedback

* Ordered imports properly

* Updated DownloadURL to return slice of bytes

* Fixed method typo

* Fixed logging

* Added read lock for prepackaged plugins list

* PR Feedback

* Added condition to only install prepackaged plugin if it was previously enabled

* Linting

* Updated to check plugin state in config

* Closing filereader

* Only add local label if remote marketplace is enabled

* Updated local tag description

* Fixed tests

Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2020-01-15 13:38:55 -05:00
Carlos Tadeu Panato Junior
da97740cc2 bump alpine version and mm as well (#13615) 2020-01-15 16:07:09 +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
Agniva De Sarker
e2e2ad48ce Add -trimpath flag to the builds (#13348)
Go 1.13 introduced this new flag which removes all absolute file system paths
from the binary and just keeps the module path / GOPATH. To debug binary
crashes or stack traces, we only need the path to the code and not the full
file path. Hence this is a quick way to reduce the binary size without any information
loss.

Shaves off around 750KB from the server binary.
2019-12-13 14:12:28 +01:00
Agniva De Sarker
bc496a0d96 Add the old fmt and vet targets to legacy.mk (#13202)
* Add the old fmt and vet targets to legacy.mk

This is to ease the transition until a time
when everybody has moved to using golangci-lint.

* Just run golangci-lint for make vet
2019-12-11 17:13:43 +05:30
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