Commit graph

266 commits

Author SHA1 Message Date
Antonis Stamatiou
0d7a2cae6a
fix: Update download action with the official one (#27194) 2024-05-29 19:30:37 +03:00
Antonis Stamatiou
97bbc549c8
fix: Fix buildEnv Dockerfile path (#27191) 2024-05-29 19:27:12 +03:00
Antonis Stamatiou
9d30a62c94
fix: Fix missing paths for build env docker image (#27190) 2024-05-29 13:41:28 +03:00
Antonis Stamatiou
d64ce93393
feat: Introduce build env image pipeline (#27189) 2024-05-29 11:39:17 +03:00
Mario Vitale
4a77d9e964
CLD-7553 Implement per-MM_ENV runs, post the E2E test links back to user (#27042)
* Add per-env runs, post feedback back to user
2024-05-21 10:55:05 +02:00
Antonis Stamatiou
4fd704d09b
fix: Migrate notifications to reusable actions (#26792) 2024-04-21 21:10:50 -04:00
Mario Vitale
1b69f2d79f
CLD-7473 Limit parallelism for full E2E tests (#26741)
* Limit parallelism for full E2E tests

* Add temporary changes for testing

* Better concurrency spec

* Do not consider github.ref for concurrency grouping

* Further improve the concurrency grouping

* Remove testing lines
2024-04-11 12:29:45 +08:00
Mario Vitale
dc36e42448
CLD-798 Add support for MM_ENV, various fixes (#26616)
* Add support for MM_ENV, various fixes
* Fix workflow template
* Fix reporting steps ordering
* Fix typo
* Improve state check message description
* Fix workflow syntax
* Fix fulltest variable generation
* Fix PR_NUMBER variable usage
* Fix BUILD_ID, add dashboard URL to status check
* Fix automation dashboard URL

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-03 12:14:19 +02:00
Agniva De Sarker
5e851f708b
MM-57245: Bump up Go version to 1.21 (#26512)
* MM-57245: Bump up Go version to 1.21

https://mattermost.atlassian.net/browse/MM-57245
```release-note
NONE
```
2024-03-21 09:12:35 +05:30
Mario Vitale
d7a77d8c42
CLD-7074 Implement full E2E tests on Github Actions (#26093)
* Move license setting from env var to mmctl upload
* Extract common E2E steps
* Add E2E fulltests
* Fix plugin_startup_fail_spec.js, timeout runners, fix local dashboard run
* Implement reporting script and job
* Bump artifact related actions
* Fix E2E variable generator script
* Skip reporting steps if not required
* Get rid of deprecation warnings
* Fix inbucket hostname parameter
* Support arbitrary refs in test template
* Fix cycle BRANCH var for non-PR commits
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-06 11:27:53 +01:00
Antonis Stamatiou
cafcc2ac06
feat: Upgrade github actions for node20 (#26318) 2024-02-28 10:55:04 +02:00
Agniva De Sarker
f4fbc90e23
Move all PR tests to free tier (#25930)
After moving only contributor PRs to free tier it was
observed that the tests actually finish faster in free tier
than with larger runners. We have let the change soak for about
a month now without any issues.

Therefore we move to free tier runners for all PRs.
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-17 09:10:38 +05:30
Agniva De Sarker
04cf1ed114
Bump up the minimum required MySQL version (#25465)
MySQL 5.7 is at end of life.

https://mattermost.atlassian.net/browse/MM-55589

```release-note
We bump up minimum MySQL version to be 8.0.0
```


Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2024-01-11 22:18:20 +05:30
Antonis Stamatiou
f118b4f0ed
fix: Fix condition for choosing runner (#25779)
* fix: Fix condition for choosing runner

* fix: Automate the GO_VERSION choice on server tests
2023-12-19 17:21:13 +02:00
Agniva De Sarker
983062189e
Run contributor PR tests on free tier (#25745)
```release-note
NONE
```
2023-12-18 16:47:39 +05:30
Antonis Stamatiou
8158c0e614
feat: Add docker image on artifacts generation summary (#25469) 2023-11-20 09:45:19 +02:00
Antonis Stamatiou
7bf9be2619
fix: Add new dev registry for pr artifacts (#25341) 2023-11-14 15:04:00 +02:00
Nicolas Le Cam
1ed5d87342
Switch to docker compose v2 (#25048) 2023-11-13 14:30:24 +01:00
Jesse Hallam
c9e71a2dde
Remove workflow failure check in favour of Argo-driven version (#25366)
* Simplify workflow failure check

Consolidate the workflow failure check directly into *-master.yml. This results in some code duplication, but makes it much clearer as to what's going on. While we're in here, remove the legacy reference to the `monorepo` branch when triggering.

* just remove the workflow in favour of the Argo version
2023-11-09 12:01:49 -04:00
Mario Vitale
2e7728b737
Fix the monorepo-checker CI job (#25287) 2023-11-03 17:31:42 +01:00
Mario Vitale
5d1cb1b931
Fix - Run artifacts workflow only for monorepo branches (#25279)
* Run artifacts jobs conditionally, add test change

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-03 16:10:40 +01:00
Antonis Stamatiou
fc87054f14
feat: Introduce go-version file to support multiple go versions on CI (#25271) 2023-11-03 16:25:54 +02:00
Jesse Hallam
83bd2746c3
fix yaml formatting issue (#25252) 2023-10-31 18:27:06 -03:00
Jesse Hallam
37dc35c1a1
report master/release-* failures (#25197) 2023-10-30 12:09:19 -03:00
Antonis Stamatiou
f01e8f6c6d
[CLD-6501] Enhance visibility for PR builds artefacts (#25141)
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
2023-10-25 18:22:15 +03:00
Jesse Hallam
c2bc4008fc
prevent modifying non-English translation files (#25002) 2023-10-19 14:40:06 -03:00
Jesse Hallam
0577a5aaa2
Fix OpenApi vetting (#23974)
* fix openApi vetting

The underlying mattermost-govet tool effectively hasn't been called for some time, as we weren't checking out and building the spec files to pass. Now that hte API is in the monorepo, build it locally and check against it.

Unfortunately, our API documentation isn't up-to-date, and this PR isn't fixing that. For now, add a discrete `make vet-api` and workflow that won't block the build until the API documentation is back in sync and can be merged into the existing `make vet` directive.

* mattermost-govet: use upstream@new

* fix missing /api/v4 prefix for commands autocomplete suggestion

* document /api/v4/ldap/users/{user_id}/group_sync_memberships

* document /api/v4/groups/{group_id}/restore

* fix /files/{file_id}/public actually at root

* document /api/v4/users/invalid_emails

* fix SetThreadUnreadByPostId

* Revert "fix SetThreadUnreadByPostId"

This reverts commit b16bcc8044.

* Revert "Revert "fix SetThreadUnreadByPostId""

This reverts commit 8bda05dc8a.

* workaround undocumented API endpoints

* remove unnecessary whiteline

* ignore go tool output

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-16 11:27:43 -03:00
Agniva De Sarker
bd982356a7
Move mmctl CI tests to free tier (#24899)
Only the -race tests in master branch takes
more memory. So it will take more time, but there's no
need to optimize run time in master as nobody
is waiting for it to complete.

```release-note
NONE
```
2023-10-13 21:09:36 +05:30
Agniva De Sarker
4f279a1dd9
Set env vars properly when running mmctl tests (#24842)
Exporting a variable doesn't really pass that
down to the docker container. We pass the `--env`
variable manually.

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-11 11:12:18 +05:30
Agniva De Sarker
fcf238523f
Optimize mmctl CI run (#24732)
* Optimize mmctl CI run

- Remove coverage mode. They increase run time by 3x.
- Remove -race mode in PR builds. They increase run time by 2x and memory consumption as well.

```release-note
NONE
```

* caching go.sum path

```release-note
NONE
```
2023-10-06 10:43:06 -03:00
Jesse Hallam
d99901aeb4
Report flaky tests directly on a PR (#24615)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-09-27 10:14:54 -03:00
Mario Vitale
1e121eb7f3
CLD-6297 - E2E tests improvements (#24541)
* Improve e2etests readme, remove unused apt install
* Add testing E2E Tests MultiOS
* Get rid of deprecation warning
* Smart selection of docker network driver for different OSes
* Unify makefile invocation for windows as well
* Tune JVM for ES and Keycloak
* fix: Made required changes to run locally on arm MacOS
* fix: FIxed network command and removed dashboard node user as it is not needed
* fix: make dashboard work for Mac
* Make runs without dashboard work again, make BROWSE tunable and document it

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-09-25 17:01:01 +02:00
Jesse Hallam
e9cc03c1c8
Constrain when we emit webhooks for retried tests (#24484)
* Constrain when we emit webhooks for retried tests

Only send webhooks (notifying all staff developers) only for retried tests on `master` and `release-*`.

* drop @devs at-mention

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-09-11 09:58:01 -03:00
Ibrahim Serdar Acikgoz
0e84ccb383
Bump Go version to v1.20 (#24439) 2023-09-07 13:06:18 +03:00
Antonis Stamatiou
dfbe0c14e7
fix: Update scorecard workflow (#24457) 2023-09-04 13:49:49 +03:00
Caleb Roseland
818225dffe
MM-52981, MM-53559: Streamlined in-product marketplace (#24311) 2023-08-25 14:39:25 -05:00
Ibrahim Serdar Acikgoz
83652aa3c2
[MM-53840] Add migration workflow (#24211) 2023-08-16 10:09:11 +03:00
Jesse Hallam
544ceeba3e
setup-node for master build from server (#24247) 2023-08-11 10:53:50 -03:00
Harrison Healey
0e30d0abb8
Disable certain actions from running on forks (#23747)
* Disable certain actions from running on forks

* Address some feedback

* Check for forks in build-docker job
2023-08-08 16:45:24 -04:00
Antonis Stamatiou
0e92139bea
feat: Introduce workflow to tag server public module (#24190) 2023-08-08 10:16:54 +03:00
Jesse Hallam
f436b3d9a8
remove legacy "Build API specification" workflow (#24142)
Now that the API source is part of the monorepo, this is already handled by the new api workflow, and can simply be removed.
2023-08-02 12:54:16 -03:00
Jesse Hallam
f4bd39d2de
Use | and \ vs. > (#24111)
GitHub actions' YAML supports the `>` directive to a multi-line command to be merged into a single line, but requires that all segments have no leading whitespace otherwise they get silently ignored.

Since this is not nearly as obvious as one might expect, fallback to just the `|` syntax using `\` to extend the lines and keep the overall formatting, fixing the reporting of retried tests via curl webhook.
2023-08-01 11:25:51 -03:00
Mario Vitale
dca39ea092
CLD-6003 - Upload smoketest results, better server logs (#24089)
* Upload smoketest results, better server logs
2023-07-24 13:15:19 +02:00
Jesse Hallam
6c821c8b13
drop public submodule replace directive (#24045)
* drop public submodule replace directive

During development of the public/ submodule, a replace directive remained that was both unnecessary and harmful as discussed in https://community.mattermost.com/private-core/pl/w77sh7igwpfb9ecj5o4jjjbbyo.

Remove that, and bump the explicit dependency (even though we use go.work) to v0.0.6 so the import paths match (e.g. `mattermost` vs `mattermost-server`).

* make modules-tidy

* consistently setup-go-work

* fix build-api-spec

* fix mmctl test template

* fix workflow copy/paste typo
2023-07-20 10:45:06 -03:00
Antonis Stamatiou
98da282f7c
fix: Add e2e-tests paths for tests trigger (#23894) 2023-07-12 10:52:05 +03:00
Jesse Hallam
82b3b67e63
secrets: inherit, to fix flaky tests report (#23961) 2023-07-06 14:03:14 -03:00
Jesse Hallam
c506e01a97
server: automatically retry CI testing failures (#23820)
* server: --rerun-fails=3 for test-server(-race)?

* --rerun-fails=3 for IS_CI=true and -race as well
2023-06-30 15:00:37 -03:00
Jesse Hallam
d9614cbb12
Move API Reference (#23777)
* merge mattermost-api-reference unchanged

* api: update repostiory paths

* api: drop GitPod for api (for now)

* api: improved node_modules target

* api: relocate GitHub actions to root

* Update .github/workflows/api.yml

Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>

* fix cache-dependency-path

* adopt node-version-file

* pin versions for uses

* tidy steps/runs

* api/.gitpod.yml: tidy

* api: rm now unused .gitlab-ci.yml

---------

Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-06-27 11:10:13 -03:00
Alejandro García Montoro
ffb869a6df
Skip ESR CI in master (#23807)
* Skip ESR CI in master

* Skip on pull requests as well

* Add comment with ticket link
2023-06-21 10:06:12 +02:00
Jesse Hallam
2765d92991
Gotestsum (#22826)
* disable coverage

This reduces runtime of the server test suite from ~30m to ~10m, and as far as I can see: we discarded the coverage output anyway.

* allow morph 60s to migrate when running tests

* scripts/test.sh: drop COVERMODE

Stop generating coverage data when running unit tests. It's likely we'll want this data back at some point, but for now it's unused and removing simplifies invoking tests for developers.

* scripts/test.sh: remove cleanup steps

* scripts/test.sh: drop TESTS parameter

* scripts/test.sh: drop TESTFLAGS parameter

* switch to gotestsum
2023-06-15 15:27:52 -03:00
Miguel de la Cruz
5d66883b04
Fixes CI (#23753)
* Fixes CI

* Fix client jest dependency
2023-06-15 09:45:54 +02:00
mvitale1989
b8858c4582
CLD-5835 - Do not use the mattermost-build-webapp image from ECR (#23748)
* Only use mattermostdevelopment images
* Fix docker mirroring workflow
* Reenable insights feature for E2E tests
2023-06-15 08:43:39 +02:00
mvitale1989
0d81e5eb40
CLD-5770 - Fix smoketests workflow (#23713)
* fix: Fix proper status update since job.status depicts current job status which is always success
* Rename status check for smoketests
* Allow localhost origin for local testing
* Increase instance size for smoketest job, better status check name

---------
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-06-13 17:29:36 +02:00
mvitale1989
0445d8348c
CLD-5698 - Add e2e smoketests (#23590)
* Prepare: run E2E smoketests with GitHub actions (#23301)
* Port E2E testing scripts from cypress-ui-automation
* Move server to docker-compose, move E2E images to ecrpublic
* Integrate General channel renaming, fixes
* Add local automation-dashboard
 Add readme
* Add E2E smoketests
* Bump postgres to 12
* Fully rely on mattermostdevelopment images

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-06-12 11:56:33 +02:00
Agniva De Sarker
f4539bc65a
MM-53090: Do not run PG binary tests on master (#23688)
https://mattermost.atlassian.net/browse/MM-53090
```release-note
NONE
```
2023-06-09 21:37:49 +05:30
Julien Tant
0468e772a9
[MM-52926] Deprecating work templates (#23466)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 18:42:03 -07:00
Saturnino Abril
1926455a00
Clean up at .github due to repo rename (#23580)
* update .github after repo rename

* update

* Update PULL_REQUEST_TEMPLATE.md

---------

Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 20:12:08 +08:00
Miguel de la Cruz
951456c780
Includes mmctl into the mono-repo (#23091)
* Includes mmctl into the mono-repo

* Update to use the new public module paths

* Adds docs check to the mmctl CI

* Fix public utils import path

* Tidy up modules

* Fix linter

* Update CI tasks to use the new file structure

* Update CI references
2023-06-05 12:42:55 +02:00
Alejandro García Montoro
c94e8c2134
MM-53002: Fix ESR CI (#23599)
* Do not use the mattermost path

The /mattermost path is used by the image and it seems to conflict with
the container running the binary

* Use a regular machine in the esr-upgrade-diff job

* Add missing space
2023-06-04 16:37:04 +05:30
Harshil Sharma
a00ee98fa2
Repo name ci fixes (#23569)
* mattermost-server -> mattermost

* mattermost-server -> mattermost

* Empty-Commit

* Empty-Commit

* Empty-Commit

---------

Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
2023-06-02 10:11:49 +03:00
Ibrahim Serdar Acikgoz
ac3b47bcae
fix server ci after renaming the project (#23576) 2023-06-01 19:39:32 -04:00
mvitale1989
74beab5ad5
Revert "Prepare: run E2E smoketests with GitHub actions (#23301)" (#23553)
This reverts commit 68be3a6bcd.
2023-05-31 16:32:51 +02:00
mvitale1989
68be3a6bcd
Prepare: run E2E smoketests with GitHub actions (#23301)
- Port E2E testing scripts from cypress-ui-automation
- Move server to docker-compose, move E2E images to ecrpublic
* Integrate General channel renaming, fixes
- Add local automation-dashboard
- Add readme
- Add E2E smoketests
- Bump postgres to 12

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-05-30 17:34:15 +02:00
Agniva De Sarker
c7295b01e5
Enable golangci-lint (attempt 2) (#23517)
This time we are just using the Makefile command
to see if that makes a difference
```release-note
NONE
```
2023-05-30 15:16:42 +05:30
Agniva De Sarker
37502af54b
MM-52441: Apply path filtering for server CI (#23295)
https://mattermost.atlassian.net/browse/MM-52441
```release-note
NONE
```
2023-05-25 13:55:23 -04:00
Agniva De Sarker
88d1743191
MM-52325: Bump morph (#23394)
This is needed to implement non-transactional migrations

https://mattermost.atlassian.net/browse/MM-52325
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-05-24 15:53:04 +05:30
Harrison Healey
3b5e556e1c
MM-52438 Clean up web app CI and only run when web app code is changed (#23232)
* MM-52438 Only run web app CI for PRs with web app changes

* MM-52438 Don't wait to run web app tests in CI

* MM-52438 Remove commented out caching

* MM-52438 Reuse steps to set up webapp environment

* MM-52438 Add test-ci script to root package.json

* Simplify path filter
2023-05-17 13:59:34 -04:00
Jesse Hallam
bb02b35048
Expose public/ API as submodule (#23345)
* model -> public/model

* plugin -> public/plugin

* public/model/utils -> public/utils

* platform/shared/mlog -> public/shared/mlog

* platform/shared/i18n -> public/shared/i18n

* platform/shared/markdown -> public/shared/markdown

* platform/services/timezones -> public/shared/timezones

* channels/einterfaces -> einterfaces

* expose public/ submodule

* go mod tidy

* .github: cache-dependency-path, setup-go-work

* modules-tidy for public/ too

* remove old gomodtidy
2023-05-10 13:07:02 -03:00
Agniva De Sarker
77a24f96d6
MM-52712: Prevent CI cancellation in master (round 2) (#23293)
We discovered that cancel-in-progress only controls
in-progress jobs. Which means that pending jobs will _always_
be cancelled regardless. There is an open discussion:
https://github.com/orgs/community/discussions/5435
which was closed saying this is how the feature is designed.

We try to work around this by refactoring into separate reusable
workflows and having concurrency only for PR workflows.

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-05-09 23:49:06 +05:30
Agniva De Sarker
c140f43e74
Rename workflows to make it clearer (#23316)
Mattermost build was a confusingly named workflow. Changed it
to Server CI to make it consistent with Webapp CI.

Also changed the filenames.

```release-note
NONE
```
2023-05-08 13:13:39 +05:30
Agniva De Sarker
9f11fc59b5
Revert "Run golangci in server CI (#23240)" (#23299)
This reverts commit 349e5d4573.
2023-05-05 10:08:35 +05:30
Agniva De Sarker
349e5d4573
Run golangci in server CI (#23240)
* Run golangci in server CI

Also reordered the checks in check-style target to run vet check
first which has far better error messages in case of unsynced branch failures.
```release-note
NONE
```
2023-05-04 19:37:30 +05:30
Agniva De Sarker
44920deab6
Prevent cancellation of CI in master (#23246)
```release-note
NONE
```
2023-05-03 23:44:00 +05:30
Akis Maziotis
8966769f00 [chore] CI. Disabling artifacts upload to mattermost dockerhub
We are disabling uploading e2e artifacts to mattermost dockerhub repository.
This was temporary, to help with the migration to the new repo, of all sourounding services.

Ticket: https://mattermost.atlassian.net/browse/CLD-5614
2023-05-03 13:23:16 +03:00
Agniva De Sarker
430ff2c83f
Fix setup-go action (#23247)
Cache the dependencies correctly with the right path to go.sum file
```release-note
NONE
```
2023-05-03 13:56:23 +05:30
fr0mdual
e3e7349a35
Merge pull request #23163 from mattermost/MM-52493
[MM-52493] workflows/artifacts.yml: do not upload build artifacts for branches
2023-04-26 18:15:34 +01:00
Ibrahim Serdar Acikgoz
1908e7397c workflows/artifacts.yml: do not upload build artifacts for branches 2023-04-26 17:02:00 +03:00
Akis Maziotis
b143a882be
[fix] CI Sentry. running on push events (#23142)
* [fix] CI Sentry. running on push events
2023-04-26 15:40:45 +03:00
fr0mdual
5aaedb5e9d
Merge pull request #23144 from mattermost/SEC-3673_DisableBranchNameManipulation
fix: Disable branch name manipulation to remove attack vector
2023-04-26 12:03:01 +01:00
Alejandro García Montoro
506c4178b5
Use ubuntu-22.04 in the check-style step in CI (#23118) 2023-04-26 12:37:39 +02:00
Antonis Stamatiou
ee23f6dc6b
fix: Fixed wrong commit sha reference from incoming webhook 2023-04-26 13:15:09 +03:00
Antonis Stamatiou
dbb73b9239
fix: Disable branch name manipulation to remove attack vector 2023-04-26 12:46:49 +03:00
Alejandro García Montoro
87908bc577
MM-51095: Foundation for ESR upgrade scripts (#22448)
* Add ESR upgrade migration and CI job to verify it

The script was generated as a simple concatenation of migrations in the
interval [54, 101] through:
    files=`for i in $(seq 54 101); do ls mysql/$(printf "%06d" $i)*up.sql; done`
    tail -n +1 $files > ../esrupgrades/esr.5.37-7.8.mysql.up.sql

The CI job runs the migration both through the server and the script,
and for now uploads the dumps generated for manual inspection. An
automatic check for differences is still needed.

* Remove debug print in script

* Fix idx_uploadsessions_type creation

* Ignore tables db_lock and db_migration on dump

* Split workflow in two parallel jobs

* Diff dumps and upload the result

* Add cleanup script

* Use DELIMITER in the script to use mysql CLI

This allows us to remove the complexity of using a different Go script
inside a Docker image.

* Standardize Roles between migrations

Document and cleanup code.

* Upload diff only if it is not empty

* Trigger action only when related files change

* Add a global timeout to the job

* Generalize ESR to ESR upgrade action (#22573)

* Generalize action

* Use logs to ensure migrations are finished

* Add migrations from 5.37 to 6.3

* Remove tables in cleanup script, not through dump

* Add initial-version input to common action

* Add migration from 6.3 to 7.8

* Remove action debug line

* ESR Upgrade: One procedure per table in the v5.37 > v7.8 upgrade script (#22590)

* Squash Users-related migrations in one query

* Squash Drafts-related migrations in one query

* Squash UploadSessions-related migrations in one query

* Squash Threads-related migrations in one query

* Squash Channels-related migrations in one query

* Squash ChannelMembers-related migrations in one query

* Squash Jobs-related migrations in one query

* Squash Sessions-related migrations in one query

* Squash Status-related migrations in one query

* Squash Posts-related migrations in one query

* Squash TeamMembers-related migrations in one query

* Squash Schemes-related migrations in one query

* Squash CommandWebhooks-related migrations in one query

* Squash OAuthApps-related migrations in one query

* Squash Teams-related migrations in one query

* Squash Reactions-related migrations in one query

* Squash PostReminders-related migrations in one query

* Adapt ThreadMemberships migration to unified style

* Adapt LinkMetadata migrations to unified style

* Adapt GroupChannels migration to unified style

* Adapt PluginKVStore migration to unified style

* Adapt UserGroups migration to unified style

* Adapt FileInfo migration to unified style

* Adapt SidebarCategories migration to unified style

* Remove blank line

* Use tabs everywhere

* Wrap every procedure with log statements

* Remove space before parentheses in procedure call

* Remove spurious extra line

* Merge two equal consecutive conditionals

* Avoid the double list of conditions/queries

* Fix variable name

* Remove outdated comment

* Add a preprocess phase with corresponding scripts

* Join all preprocess scripts setting ExpiresAt to 0

This preprocessing is something we should always do, no matter the input
DB, so we can use a common script for all cases instead of repeating the
same code in multiple files.

* Add system-bot if it does not exist

* Cleanup the ProductNoticeViewState table

* Fix SQL

* Move esrupgrades directory under server/

* Update paths in Github action

* Fix trigger path for CI
2023-04-20 19:41:36 +02:00
Caleb Roseland
b95e546482 step names 2023-04-18 11:29:31 -05:00
Caleb Roseland
374166bba9 add ci steps 2023-04-17 10:17:48 -05:00
Akis Maziotis
fbe7323079 [fix] CI Correctly identify artifact downloads
We are defining the workflow directive to for `Artifacts generation and upload`/cd/Download artifacts step.
To be the workflow_id from the calling workflow

Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
2023-04-10 19:27:47 +03:00
Akis Maziotis
24bf163171 [feat] Uploading mm-te-test artifacts to mattermost docker registry
Required by Cloud Platform team for smooth migration of Spinwick service to the new DockerHub registry.
Context: https://community.mattermost.com/private-core/pl/3jzzxzfiji8hx833ewyuthzkjh
2023-04-10 16:50:17 +03:00
Akis Maziotis
d0bee0162c [feat] CI. Run artifact uploads in workflow secure context
We are seperating artifacts generation/upload process, into a seperate workflow.
This runs in pricileged mode, using `workflow_run` trigger.
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
Note: This event will only trigger a workflow run if the workflow file is on the default branch.(master)

Docker artifacts, are now exposed under the newly porivisioned DockerHub Org account: "mattermostdevelopment"
https://hub.docker.com/repository/docker/mattermostdevelopment/mm-te-test/tags?page=1&ordering=last_updated

Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
2023-04-10 16:50:17 +03:00
Akis Maziotis
2dc535381a [chore] CI Name change for mattermost build workflow 2023-04-10 16:50:17 +03:00
Caleb Roseland
fa7057bfbf
Merge pull request #22629 from mattermost/fix-boards-webapp-unit-tests 2023-03-31 10:16:00 -05:00
Ibrahim Serdar Acikgoz
5cc49cf881
Include workflow name in the context ref (#22728) 2023-03-30 14:01:55 +03:00
Caleb Roseland
6da94c769c Merge branch 'master' into fix-boards-webapp-unit-tests 2023-03-29 09:37:24 -05:00
Ibrahim Serdar Acikgoz
5267dfdcc6
Cancel in progress workflows but exclude master (#22684) 2023-03-29 15:56:12 +03:00
Eva Sarafianou
3f13d8fd41
Merge pull request #22713 from mattermost/codeql_monorepo
[SEC-3469] Update codeql config for monorepo
2023-03-29 14:45:24 +02:00
Eva Sarafianou
6bdadc246c Update codeql config for monorepo 2023-03-29 12:55:00 +02:00
Mario Vitale
ba6b97fb62 Move /e2e -> /e2e-tests 2023-03-28 18:10:00 +02:00
Christopher Speller
d0babfd254
Remove unhelpful test publish. (#22633) 2023-03-27 14:04:28 -07:00
Ibrahim Serdar Acikgoz
379dbb1ca8
Add setup-go action (#22618) 2023-03-24 18:07:23 +03:00
Ibrahim Serdar Acikgoz
5c857e9df3
add concurrency limitation to gh actions (#22638) 2023-03-24 17:04:15 +03:00
Caleb Roseland
4331ad24d3 run boards webapp tests in ci 2023-03-23 14:39:53 -05:00
Harrison Healey
9b5afb1b5f
Run tests for all web app packages in CI (#22579)
* Run tests for all web app packages in CI

* Test specific packages instead of all of them

* Revert back to using test-ci scripts and rely on Jest to count the number of CPU cores

* Revert more changes made to the web app CI tests

* Fix path to client package tests
2023-03-23 14:23:56 -04:00
Harrison Healey
1edbde8aa3
Run type check for all web app packages in CI (#22578)
* Fix incorrect usage of types pacakge

* Make platform packages properly expose their type definitions

* Have Boards, Channels, and Playbooks get types from platform packages properly

* Run type check for all web app packages in CI

* Fix incorrect job name
2023-03-23 10:10:52 -04:00
Harrison Healey
2eb5dac9b7
Run build for all web app packages as part of Web App CI (#22577) 2023-03-23 10:10:40 -04:00
Harrison Healey
f294ef9843
Run linters for all web app packages as part of Web App CI linting (#22576) 2023-03-23 10:10:28 -04:00
Doug Lauder
c943ed6859
Mono repo -> Master (#22553)
Combines the following repositories into one:

https://github.com/mattermost/mattermost-server
https://github.com/mattermost/mattermost-webapp
https://github.com/mattermost/focalboard
https://github.com/mattermost/mattermost-plugin-playbooks
2023-03-22 17:22:27 -04:00
Ibrahim Serdar Acikgoz
9c7aab24f5
Use getsentry/action-release@v1 for sentry release (#22418) 2023-03-02 19:59:55 +03:00
Ibrahim Serdar Acikgoz
87755d6994
add sentry org to the env vars (#22416) 2023-03-02 18:07:08 +03:00
Ibrahim Serdar Acikgoz
931142b640
Migrate to CI pipeline to GitHub actions (#22392)
* migrate to CI pipeline to github actions

* simplfy workflow

---------

Co-authored-by: Akis Maziotis <36594156+phoinixgrr@users.noreply.github.com>
2023-03-02 16:12:24 +03:00
Daniel Schalla
6d7e9af081
[CLD-4570] Disable CodeQL Auto Build (#21716)
* Disable CodeQL Auto Build

* Update codeql-analysis.yml

* Separate Linux Build Targets
2022-11-24 16:16:39 +05:30
Rohitesh Gupta
9e72ca1867
Updated CodeQL to use latest version (#21436)
* Update CodeQL to latest version
2022-10-18 12:44:19 +05:30
Ashish Kurmi
e1a5405049
ci: add minimum GitHub token permissions for workflows (#20975)
* ci: add minimum GitHub token permissions for workflows

Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>

* removing actions and contents read permissions from codeql actions workflow

Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>

Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-29 06:13:07 +02:00
Ossi Väänänen
361e260798
Update Scorecards action (#19879) 2022-03-31 13:40:12 +03:00
Rohitesh Gupta
00d445d533
Fixed CodeQL failures on master push (#19866)
* Running CodeQL everyday twice

* Updated scorecard-check to run everyday

* Running Scorecard job once a day

* Disabling Scorecard Job on every PR

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-30 10:52:22 +05:30
Agniva De Sarker
dbcb5f2ffb
Add debug logs to initialize CodeQL (#19844) 2022-03-28 15:30:18 +05:30
Ossi Väänänen
fa70696d77
Adding the Scorecard analysis (#19424)
https://github.com/ossf/scorecard
2022-02-16 14:54:46 +02:00
Rohitesh Gupta
a19614a101
MM-31882 - Add CodeQL check (#16661)
* Created codeql-analysis

* Updated codeql cron time

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-14 00:46:58 +05:30