Commit Graph

78 Commits

Author SHA1 Message Date
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
M-ZubairAhmed
36a6a0d9d0 Update PULL_REQUEST_TEMPLATE.md to include Jira ticket for contributors (#23589) 2023-06-02 20:35:57 +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
Pablo Andrés Vélez Vidal
71923fe311 add screenshots section to github pr template (#22868) 2023-04-06 19:30:28 +02: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