Commit Graph

52 Commits

Author SHA1 Message Date
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
Ossi Väänänen
fa70696d77 Adding the Scorecard analysis (#19424)
https://github.com/ossf/scorecard
2022-02-16 14:54:46 +02:00
Carlos Tadeu Panato Junior
f73c77611f update pr template (#17480) 2021-04-27 10:30:48 +02:00
Amy Blais
16e6296c54 Update PULL_REQUEST_TEMPLATE.md (#17208)
Automatic Merge
2021-03-29 18:32:16 +02:00
Amy Blais
7cd15cd7e0 Update ISSUE_TEMPLATE.md (#16987)
Automatic Merge
2021-02-21 08:22:27 +01:00
Martin Kraft
d7a00bc667 Expands release note instructions. (#16696)
* Expands release note instructions.

* Updates pluralization for consistency.

* Removes explicit reference to release note block.

* Removes unnecessary reason for past-tense.

* Adds message about newlines being stripped.

* Adds other criteria for release notes.
2021-01-15 21:33:13 -05: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
Martin Kraft
b3260e58e2 Adds the release-note block to the PR template. (#14975)
* Adds the release-note block to the PR template.

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-19 09:53:54 -04:00
Hanzei
eaeede66b2 Update pull request template (#10142)
* Update pull request template

* Changes as requested

* Link to https://developers.mattermost.com/contribute/server/developer-workflow/#running-only-specific-server-unit-tests

* Move PR and issue template to .github

* Update per feedback

See https://community.mattermost.com/core/pl/1ikmqhzw1ffsfepzyb4575bkih

* Changes as requested

* Remove checklist
2019-03-22 08:31:02 -04:00
Carlos Tadeu Panato Junior
27daa7b45b remove stale bot in favor of mattermod (#10428) 2019-03-11 16:39:22 +01:00