MM-46275/MM-46979 Production MPA for web app (#21401)
* MM-46275 Unify various targets for building web app * MM-46275/MM-46979 Add logic to package boards product static files in CI * Add error meessage when Boards files can't be found during packaging * Remove a couple unneeded lines from release.mk * Decrease size of machine used for setup-focalboard-product * Revert "Add error meessage when Boards files can't be found during packaging" This reverts commit f4f46ade0ac4c1ec5525d9b2eae959e13b9aec42. * Revert "Revert "Add error meessage when Boards files can't be found during packaging"" This reverts commit a0e6420b19c5af0b5ff4706b6abaf8e56f8b3495. * Fix unrelated email templates * Skip flaky test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ee3fae80bc
Коммит
499f731a2b
@@ -66,14 +66,37 @@ jobs:
|
|||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
if [[ -f "$FILE_DIST" ]]; then
|
if [[ -f "$FILE_DIST" ]]; then
|
||||||
|
echo "Precompiled version of web app found"
|
||||||
mkdir dist && tar -xf $FILE_DIST -C dist --strip-components=1
|
mkdir dist && tar -xf $FILE_DIST -C dist --strip-components=1
|
||||||
else
|
else
|
||||||
npm ci --silent && make build
|
echo "Building web app from source"
|
||||||
|
make dist
|
||||||
fi
|
fi
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: /mnt/ramdisk
|
root: /mnt/ramdisk
|
||||||
paths:
|
paths:
|
||||||
- mattermost-webapp
|
- mattermost-webapp
|
||||||
|
setup-focalboard-product:
|
||||||
|
working_directory: /mnt/ramdisk/
|
||||||
|
docker:
|
||||||
|
- image: cimg/go:1.18-node
|
||||||
|
resource_class: large
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: /mnt/ramdisk
|
||||||
|
- run: |
|
||||||
|
cd focalboard
|
||||||
|
echo "Building Boards product for web app"
|
||||||
|
# make prebuild build-product # TODO figure out how to get this to run without bypassing the Makefile
|
||||||
|
make prebuild
|
||||||
|
cd mattermost-plugin/webapp
|
||||||
|
npm run build:product
|
||||||
|
cd ../..
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: /mnt/ramdisk
|
||||||
|
paths:
|
||||||
|
- focalboard/mattermost-plugin/webapp/dist
|
||||||
|
|
||||||
check-app-layers:
|
check-app-layers:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/go:1.18
|
- image: cimg/go:1.18
|
||||||
@@ -460,6 +483,14 @@ workflows:
|
|||||||
ignore:
|
ignore:
|
||||||
- master
|
- master
|
||||||
- /^release-.*/
|
- /^release-.*/
|
||||||
|
- setup-focalboard-product:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore:
|
||||||
|
- master
|
||||||
|
- /^release-.*/
|
||||||
|
requires:
|
||||||
|
- setup-multi-product-repositories
|
||||||
- check-go-mod-tidy:
|
- check-go-mod-tidy:
|
||||||
requires:
|
requires:
|
||||||
- setup-multi-product-repositories
|
- setup-multi-product-repositories
|
||||||
@@ -503,6 +534,7 @@ workflows:
|
|||||||
- check-migrations
|
- check-migrations
|
||||||
- build-api-spec
|
- build-api-spec
|
||||||
- setup-mattermost-webapp
|
- setup-mattermost-webapp
|
||||||
|
- setup-focalboard-product
|
||||||
- build-focalboard:
|
- build-focalboard:
|
||||||
requires:
|
requires:
|
||||||
- check-go-mod-tidy
|
- check-go-mod-tidy
|
||||||
@@ -533,6 +565,7 @@ workflows:
|
|||||||
- check-migrations
|
- check-migrations
|
||||||
- build-api-spec
|
- build-api-spec
|
||||||
- setup-mattermost-webapp
|
- setup-mattermost-webapp
|
||||||
|
- setup-focalboard-product
|
||||||
- test:
|
- test:
|
||||||
name: test-postgres-normal
|
name: test-postgres-normal
|
||||||
dbdriver: postgres
|
dbdriver: postgres
|
||||||
@@ -550,6 +583,7 @@ workflows:
|
|||||||
- check-migrations
|
- check-migrations
|
||||||
- build-api-spec
|
- build-api-spec
|
||||||
- setup-mattermost-webapp
|
- setup-mattermost-webapp
|
||||||
|
- setup-focalboard-product
|
||||||
- test:
|
- test:
|
||||||
name: test-postgres-binary
|
name: test-postgres-binary
|
||||||
dbdriver: postgres
|
dbdriver: postgres
|
||||||
@@ -567,6 +601,7 @@ workflows:
|
|||||||
- check-migrations
|
- check-migrations
|
||||||
- build-api-spec
|
- build-api-spec
|
||||||
- setup-mattermost-webapp
|
- setup-mattermost-webapp
|
||||||
|
- setup-focalboard-product
|
||||||
- test-schema:
|
- test-schema:
|
||||||
requires:
|
requires:
|
||||||
- check-go-mod-tidy
|
- check-go-mod-tidy
|
||||||
@@ -580,6 +615,7 @@ workflows:
|
|||||||
- check-migrations
|
- check-migrations
|
||||||
- build-api-spec
|
- build-api-spec
|
||||||
- setup-mattermost-webapp
|
- setup-mattermost-webapp
|
||||||
|
- setup-focalboard-product
|
||||||
- upload-artifacts-to-s3:
|
- upload-artifacts-to-s3:
|
||||||
context: mattermost-ci-pr-builds-s3
|
context: mattermost-ci-pr-builds-s3
|
||||||
requires:
|
requires:
|
||||||
@@ -605,6 +641,14 @@ workflows:
|
|||||||
- master
|
- master
|
||||||
- /^release-.*/
|
- /^release-.*/
|
||||||
- cloud
|
- cloud
|
||||||
|
- setup-focalboard-product:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore:
|
||||||
|
- master
|
||||||
|
- /^release-.*/
|
||||||
|
requires:
|
||||||
|
- setup-multi-product-repositories
|
||||||
- check-go-mod-tidy:
|
- check-go-mod-tidy:
|
||||||
requires:
|
requires:
|
||||||
- setup-multi-product-repositories
|
- setup-multi-product-repositories
|
||||||
@@ -652,6 +696,7 @@ workflows:
|
|||||||
- check-migrations
|
- check-migrations
|
||||||
- build-api-spec
|
- build-api-spec
|
||||||
- setup-mattermost-webapp
|
- setup-mattermost-webapp
|
||||||
|
- setup-focalboard-product
|
||||||
- build-focalboard:
|
- build-focalboard:
|
||||||
requires:
|
requires:
|
||||||
- check-go-mod-tidy
|
- check-go-mod-tidy
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ func TestMetrics(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("ensure the metrics server is started with advanced metrics", func(t *testing.T) {
|
t.Run("ensure the metrics server is started with advanced metrics", func(t *testing.T) {
|
||||||
|
t.Skip("MM-47635")
|
||||||
th := Setup(t, StartMetrics())
|
th := Setup(t, StartMetrics())
|
||||||
defer th.TearDown()
|
defer th.TearDown()
|
||||||
|
|
||||||
|
|||||||
@@ -190,6 +190,17 @@ else
|
|||||||
done
|
done
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@# Products
|
||||||
|
|
||||||
|
@if [ -d $(BUILD_BOARDS_DIR) ] ; then \
|
||||||
|
echo "Copying web app files for Boards product"; \
|
||||||
|
mkdir -p $(DIST_PATH_GENERIC)/client/products/boards; \
|
||||||
|
cp -R $(BUILD_BOARDS_DIR)/mattermost-plugin/webapp/dist/* $(DIST_PATH_GENERIC)/client/products/boards/; \
|
||||||
|
else \
|
||||||
|
echo "Unable to find files for Boards product. Please ensure that the Focalboard repository is checked out alongside the server and run 'make build-product' in it."; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
package-osx-amd64: package-prep
|
package-osx-amd64: package-prep
|
||||||
DIST_PATH_GENERIC=$(DIST_PATH_OSX_AMD64) CURRENT_PACKAGE_ARCH=darwin_amd64 PLUGIN_ARCH=osx-amd64 MMCTL_PLATFORM="Darwin-x86_64" MM_BIN_NAME=mattermost $(MAKE) package-general
|
DIST_PATH_GENERIC=$(DIST_PATH_OSX_AMD64) CURRENT_PACKAGE_ARCH=darwin_amd64 PLUGIN_ARCH=osx-amd64 MMCTL_PLATFORM="Darwin-x86_64" MM_BIN_NAME=mattermost $(MAKE) package-general
|
||||||
@# Package
|
@# Package
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user