Commit Graph

33 Commits

Author SHA1 Message Date
Mario de Frutos Dieguez
58d362e0c8 Include cloud defaults in the EE release package (#16277)
That defaults file would be used in the cloud installations to set the
initial values for them
2020-11-16 16:52:26 +01: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
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
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
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 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
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
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
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
scott lee davis
2fa63b10ec MM 7971 dockerhost -> localhost && docker -> docker-compose (#10872)
* replace dockerhost with localhost

* remove uneeded setup-max build step (no more dockerhost)

* changes as recommended by @cpanato

* make clean-docker with docker-compose

* added ports to docker-compose.yml (needed for osx).   ignore error for ldapadd (when already exists)

* add clean-old-docker to legacy.mk

* docker-compose stop instead of down for `make stop-docker`
2019-08-02 11:53:00 -03:00
Eli Yukelzon
6a42ad2af5 [MM-14400] Programmatically generate default.json (#10551)
* create/update config.json using go generate

* added default config generator
added config-reset to Jenkins and make package, updated defaults to consider 'isNew' flag

* corrections after code review

* fixed Config.isValid to handle empty encryption keys

* fixed Config.isValid to handle empty encryption keys

* fixed Config.isValid to handle empty encryption keys

* isUpdate now only checks for nil

* Addressed review comments, added unit testing for default config generator

* err shadowing

* license

* provide output file for config generator via ENV variable, since go generate doesn't support arguments and we need two output paths (config-reset and package)

* cleanup

* proper defaults for PushNotificationServer and SendPushNotifications

* corrected generating defaults for TrustedProxyIPHeader to be consistent with default.json in master

* Check for empty SiteURL as well as nil

* corrected SiteURL settings and checking

* crazy typos fixed

* corrected tests to newly expected values

* relaxed the checks

* fixed formatting
2019-06-06 13:57:01 -04:00
Lev
9b27558611 MM-15819 Add Autolink as a prepackaged plugin (#11040)
* Addink Autolink as a prepackaged plugin

* Fix packaging script.
2019-06-03 09:47:38 -07:00
Christopher Speller
118cd02613 MM-15882 Switching to new ci for prepackaged plugins and stripping alternate platform binaries. (#11025)
* Switching to new ci for prepackaged plugins and stripping alternate platform binaries.

* Feedback
2019-06-03 08:11:42 -07:00
Christopher Speller
866e3fb10c Fixing prepackaged plugin build process. (#10547) 2019-04-02 22:05:41 +02:00
Julien Reichardt
64562d53c0 Build tooling enhancements (#10429)
* Add LDFLAGS variable

* Replace curl by wget

* Revert "Replace curl by wget"

This reverts commit f40323c3d2.

* Use curl instead of wget

* Merge GO_LINKER_FLAGS into LDFLAGS
2019-03-26 15:19:12 -07:00
Jesse Hallam
72448d12a9 deprecate timezones.json (#10311) 2019-02-25 12:07:45 -04:00
Jesse Hallam
3a71709103 MM-13893: refactor config (#10230)
* refactor utils/config* to config/

* pull validateLdapFilter into app

* clean up Config/GetConfig/GetSanitizedConfig usage

Eliminate app.GetConfig() in favour of just using app.Config() directly,
but expose app.GetSanitizedConfig() for when the old behaviour was
required.

* web: isolate config setup

* TestInvitePeopleProvider: make config explicit

* regenerateClientConfig: avoid racey map access

* integrate watch flag into app.ConfigFile option

* make app.Option return an error

* release.mk: only cp static files from config/

* release.mk: fix cp static files from config/

* api4: TestPlugin cleanup

* s/c/cfg/ for clarity

* fix merge conflict

* testlib: allow customization of testlib driver name
2019-02-12 08:37:54 -05:00
Martin Kraft
afcb224a79 Adds configuration for separate reply-to email header. (#10144)
* Adds configuration for separate reply-to email header.

* Changes config setting name.

* Using a separate variable and value in test.

* Updates for config pointer changes in another PR.

* Adds new key to test config. Adds default value.
2019-02-04 17:01:05 -05:00
Hanzei
1f197d7c55 Fix downloading of prepackged plugins for releases (#9994) 2018-12-13 11:29:49 -05:00
Carlos Tadeu Panato Junior
940d0bbbc2 add pre-package plugins to the MM package (#9114) 2018-07-16 17:02:13 +02:00
Jesse Hallam
912b140cc5 remove redundant checks in build.mk (#9015) 2018-06-29 10:15:01 +02:00
Christopher Speller
11cbb59747 Renaming platform binary to mattermost. (#8801) 2018-05-17 12:40:40 -07:00
Christopher Speller
26b523e4a1 Revert "add individual platform packaging targets (#8366)" (#8537)
This reverts commit f0f4f68def.
2018-03-28 14:54:58 -07:00
Jesús Espino
b2dd00dd5b Adding enterprise commands support (#8327) 2018-03-07 20:04:18 +00:00
Chris
f0f4f68def add individual platform packaging targets (#8366) 2018-02-26 02:48:56 -05:00
Christopher Speller
adab1a660f Fixing some build issues 2017-09-20 13:06:22 -07:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Christopher Speller
7bc8e9a08d Adding jenkinsfile for new build server. 2017-09-06 23:11:58 -07:00