Skip to content

Commit

Permalink
Removed mattermost-plugin folder (#5029)
Browse files Browse the repository at this point in the history
* refactor: removed mattermost-plugin folder

* reverted the mysql image version

* Removed `mattermost-plugin` from make rules (#5030)

* removed mattermost-plugin from make rules

* removed: mattermost-plugin code from the repo

* updated snapshot and fix test (#5031)

* updated snapshot and fix test

* Updated snapshot and removed unnecessary tests

* chore: minor fix ci

* refactor: updated the mac-os version supported by github actions

* reverted: mac os version

* refactor: updated mac os version and also changed docker-compose to docker compose

* removed version from docker compose as no long needed

* reverted mysql docker version

* updated mysql version

* testing

* revert testing

* refactor: added version for mysql docker compose file

* test: test commit

* updated snapshot and fix test (#5032)

* removed mattermost-plugin from make rules

* removed: mattermost-plugin code from the repo

* updated snapshot and fix test

* Updated snapshot and removed unnecessary tests

* chore: minor fix ci

* refactor: removed isplugin code from server

* final attempt

* ci: Minor ci tweaks and upgrades

---------

Co-authored-by: Antonis Stamatiou <[email protected]>
  • Loading branch information
Rajat-Dabade and toninis authored Aug 28, 2024
1 parent 61bd97d commit 613fd19
Show file tree
Hide file tree
Showing 151 changed files with 384 additions and 53,155 deletions.
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
Loading

0 comments on commit 613fd19

Please sign in to comment.