Commit Graph

61 Commits

Author SHA1 Message Date
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
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
Amy Blais
cbb50a79e3 Update ISSUE_TEMPLATE.md (#22230)
Automatic Merge
2023-02-02 20:48:49 +02:00
Amy Blais
63f05ee1a3 Update ISSUE_TEMPLATE.md (#22125)
Automatic Merge
2023-01-24 17:45:03 +02: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
Carrie Warner (Mattermost)
c00609ab8e Added schema migration template to PR template (#20717)
A schema migration template is now available to help guide release note development.
2022-07-26 16:17:50 -04: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
Carrie Warner (Mattermost)
dcd66d2146 MM-41988 Updated links to legacy domain about.mm.com (#19552)
* Updated links to legacy domain about.mm.com

* Legacy link updates

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* about.mm.com URL updates

* mattermost.org URL updates

* forum.mm.org URL update

* Update .github/ISSUE_TEMPLATE.md

* Update .github/ISSUE_TEMPLATE.md

* Un-deleted language files

* Update README.md

* Update tests/test-config.json

* fix some test due to url updating (#19787)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2022-03-16 19:47:57 +08:00