Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MM-59253]: Remove plugin code from focalboard repo #5027

Merged
merged 11 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ node_modules
.github/
mac/
win-wpf/
mattermost-plugin/
website/
linux/
go.work
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
jobs:

ci-ubuntu-server:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
matrix:
Expand All @@ -27,38 +27,36 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: "focalboard"
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version-file: server/go.mod

- name: "Test server: ${{matrix['db']}}"
run: cd focalboard; make server-test-${{matrix['db']}}
run: make server-test-${{matrix['db']}}

ci-ubuntu-webapp:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: "focalboard"

- name: npm ci
run: |
cd focalboard/webapp && npm ci && cd -
cd focalboard/mattermost-plugin/webapp && npm ci
run: cd focalboard/webapp && npm ci && cd -

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version-file: focalboard/server/go.mod

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.11.0
node-version-file: focalboard/webapp/.nvmrc

- name: Build Linux server
run: cd focalboard; make server-linux-package
Expand All @@ -85,20 +83,20 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: "focalboard"

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version-file: focalboard/server/go.mod

- name: "Test server (minimum): ${{matrix['db']}}"
run: cd focalboard; make server-test-mini-${{matrix['db']}}

ci-mac-server:
runs-on: macos-11
runs-on: macos-12

strategy:
matrix:
Expand All @@ -107,14 +105,14 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: "focalboard"

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version-file: focalboard/server/go.mod

- name: "Test server (minimum): ${{matrix['db']}}"
run: cd focalboard; make server-test-mini-${{matrix['db']}}
80 changes: 3 additions & 77 deletions .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,10 @@ jobs:

- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx


- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx


- name: npm ci
run: cd focalboard/webapp; npm ci --no-optional

Expand Down Expand Up @@ -72,7 +66,7 @@ jobs:
path: ${{ github.workspace }}/focalboard/linux/dist/focalboard-linux.tar.gz

macos:
runs-on: macos-11
runs-on: macos-12

steps:

Expand All @@ -83,15 +77,9 @@ jobs:
- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: npm ci
run: cd focalboard/webapp; npm ci --no-optional

Expand Down Expand Up @@ -126,15 +114,6 @@ jobs:
- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Add msbuild to PATH
uses: microsoft/[email protected]

Expand Down Expand Up @@ -170,56 +149,3 @@ jobs:
with:
name: focalboard-win.zip
path: ${{ github.workspace }}/focalboard/win-wpf/dist/focalboard-win.zip

plugin:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
with:
path: "focalboard"

- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: npm ci
run: cd focalboard/webapp; npm ci --no-optional

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20.11.0

- name: Build webapp
run: cd focalboard; make webapp

- name: npm ci plugin dependencies
run: cd focalboard/mattermost-plugin/webapp; npm ci --no-optional

- name: Build plugin
run: cd focalboard/mattermost-plugin; make dist
env:
BUILD_NUMBER: ${{ github.run_id }}

- name: Rename plugin file
run: cd focalboard/mattermost-plugin/dist; mv focalboard-*.tar.gz mattermost-plugin-focalboard.tar.gz

- name: Upload plugin artifact
uses: actions/upload-artifact@v3
with:
name: mattermost-plugin-focalboard.tar.gz
path: ${{ github.workspace }}/focalboard/mattermost-plugin/dist/mattermost-plugin-focalboard.tar.gz
75 changes: 2 additions & 73 deletions .github/workflows/prod-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,9 @@ jobs:
- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: npm ci
run: cd focalboard/webapp; npm ci --no-optional

Expand Down Expand Up @@ -69,7 +63,7 @@ jobs:
path: ${{ github.workspace }}/focalboard/linux/dist/focalboard-linux.tar.gz

macos:
runs-on: macos-11
runs-on: macos-12

steps:

Expand All @@ -81,15 +75,9 @@ jobs:
- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: npm ci
run: cd focalboard/webapp; npm ci --no-optional

Expand Down Expand Up @@ -125,15 +113,9 @@ jobs:
- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Add msbuild to PATH
uses: microsoft/[email protected]

Expand Down Expand Up @@ -169,57 +151,4 @@ jobs:
with:
name: focalboard-win.zip
path: ${{ github.workspace }}/focalboard/win-wpf/dist/focalboard-win.zip

plugin-release:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: "focalboard"

- name: Replace token 1 server
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 1 webapp
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: Replace token 2 server
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go

- name: Replace token 2 webapp
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/mattermost-plugin/webapp/src/index.tsx

- name: npm ci
run: cd focalboard/webapp; npm ci --no-optional

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20.11.0

- name: Build webapp
run: cd focalboard; make webapp

- name: npm ci plugin dependencies
run: cd focalboard/mattermost-plugin/webapp && npm ci

- name: Build plugin
run: cd focalboard/mattermost-plugin; make dist
env:
BUILD_NUMBER: ${{ github.run_id }}

- name: Rename plugin file
run: cd focalboard/mattermost-plugin/dist; mv focalboard-*.tar.gz mattermost-plugin-focalboard.tar.gz

- name: Upload plugin artifact
uses: actions/upload-artifact@v3
with:
name: mattermost-plugin-focalboard.tar.gz
path: ${{ github.workspace }}/focalboard/mattermost-plugin/dist/mattermost-plugin-focalboard.tar.gz

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ webapp/cypress/screenshots
webapp/cypress/videos
server/swagger/clients
server/vendor
mattermost-plugin/vendor
mattermost-plugin/dist
.idea
docker/certs
docker/data
server/**/*.coverage
mattermost-plugin/**/*.coverage
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"linux/dist/**": true,
},
"editor.codeActionsOnSave": {
// "source.organizeImports": true,
Rajat-Dabade marked this conversation as resolved.
Show resolved Hide resolved
"source.fixAll.eslint": true,
"source.fixAll.eslint": "explicit"
},
"[typescriptreact]": {
"editor.codeActionsOnSave": {
Expand Down
Loading
Loading