mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-27 08:31:20 +02:00
Modify go.work file to include multi-product architecture repositories by default (#3516)
* Fix pipelines and makefile to build multi-product architecture repositories Signed-off-by: Mustafa Kara <mustafa.kara@mattermost.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: wiggin77 <wiggin77@warpmail.net>
This commit is contained in:
parent
158f28ec29
commit
e7b5830a20
@ -8,4 +8,4 @@ mattermost-plugin/
|
|||||||
website/
|
website/
|
||||||
linux/
|
linux/
|
||||||
go.work
|
go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
|
93
.github/workflows/ci.yml
vendored
93
.github/workflows/ci.yml
vendored
@ -8,6 +8,10 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||||
|
EXCLUDE_ENTERPRISE: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
ci-ubuntu-server:
|
ci-ubuntu-server:
|
||||||
@ -23,26 +27,57 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: 1.18.1
|
go-version: 1.18.1
|
||||||
|
|
||||||
- name: "Test server: ${{matrix['db']}}"
|
- name: "Test server: ${{matrix['db']}}"
|
||||||
run: make server-test-${{matrix['db']}}
|
run: cd focalboard; make server-test-${{matrix['db']}}
|
||||||
|
|
||||||
ci-ubuntu-webapp:
|
ci-ubuntu-webapp:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
- name: npm ci
|
- name: npm ci
|
||||||
run: |
|
run: |
|
||||||
cd webapp && npm ci && cd -
|
cd focalboard/webapp && npm ci && cd -
|
||||||
cd mattermost-plugin/webapp && npm ci
|
cd focalboard/mattermost-plugin/webapp && npm ci
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
@ -55,19 +90,19 @@ jobs:
|
|||||||
node-version: 16.1.0
|
node-version: 16.1.0
|
||||||
|
|
||||||
- name: Build Linux server
|
- name: Build Linux server
|
||||||
run: make server-linux-package
|
run: cd focalboard; make server-linux-package
|
||||||
|
|
||||||
- name: Copy server binary for Cypress
|
- name: Copy server binary for Cypress
|
||||||
run: cp bin/linux/focalboard-server bin/
|
run: cp focalboard/bin/linux/focalboard-server focalboard/bin/
|
||||||
|
|
||||||
- name: Upload server package
|
- name: Upload server package
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: focalboard-server-linux-amd64.tar.gz
|
name: focalboard-server-linux-amd64.tar.gz
|
||||||
path: ${{ github.workspace }}/dist/focalboard-server-linux-amd64.tar.gz
|
path: ${{ github.workspace }}/focalboard/dist/focalboard-server-linux-amd64.tar.gz
|
||||||
|
|
||||||
- name: Lint & test webapp
|
- name: Lint & test webapp
|
||||||
run: make webapp-ci
|
run: cd focalboard; make webapp-ci
|
||||||
|
|
||||||
ci-windows-server:
|
ci-windows-server:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
@ -80,6 +115,23 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
@ -87,7 +139,7 @@ jobs:
|
|||||||
go-version: 1.18.1
|
go-version: 1.18.1
|
||||||
|
|
||||||
- name: "Test server (minimum): ${{matrix['db']}}"
|
- name: "Test server (minimum): ${{matrix['db']}}"
|
||||||
run: make server-test-mini-${{matrix['db']}}
|
run: cd focalboard; make server-test-mini-${{matrix['db']}}
|
||||||
|
|
||||||
ci-mac-server:
|
ci-mac-server:
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
@ -100,6 +152,23 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
@ -107,4 +176,4 @@ jobs:
|
|||||||
go-version: 1.18.1
|
go-version: 1.18.1
|
||||||
|
|
||||||
- name: "Test server (minimum): ${{matrix['db']}}"
|
- name: "Test server (minimum): ${{matrix['db']}}"
|
||||||
run: make server-test-mini-${{matrix['db']}}
|
run: cd focalboard; make server-test-mini-${{matrix['db']}}
|
||||||
|
146
.github/workflows/dev-release.yml
vendored
146
.github/workflows/dev-release.yml
vendored
@ -7,29 +7,49 @@ on:
|
|||||||
branches: [ main, release-** ]
|
branches: [ main, release-** ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||||
|
EXCLUDE_ENTERPRISE: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
ubuntu:
|
ubuntu:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
|
|
||||||
- name: Replace token 1 server
|
- name: Replace token 1 server
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 1 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: Replace token 2 server
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 2 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: npm ci
|
||||||
run: cd webapp; npm ci --no-optional
|
run: cd focalboard/webapp; npm ci --no-optional
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
@ -51,7 +71,7 @@ jobs:
|
|||||||
run: sudo apt-get install libwebkit2gtk-4.0-dev
|
run: sudo apt-get install libwebkit2gtk-4.0-dev
|
||||||
|
|
||||||
- name: Build Linux server and app
|
- name: Build Linux server and app
|
||||||
run: make server-linux-package linux-app
|
run: cd focalboard/; make server-linux-package linux-app
|
||||||
env:
|
env:
|
||||||
BUILD_NUMBER: ${{ github.run_id }}
|
BUILD_NUMBER: ${{ github.run_id }}
|
||||||
|
|
||||||
@ -59,13 +79,13 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: focalboard-server-linux-amd64.tar.gz
|
name: focalboard-server-linux-amd64.tar.gz
|
||||||
path: ${{ github.workspace }}/dist/focalboard-server-linux-amd64.tar.gz
|
path: ${{ github.workspace }}/focalboard/dist/focalboard-server-linux-amd64.tar.gz
|
||||||
|
|
||||||
- name: Upload app package
|
- name: Upload app package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: focalboard-linux.tar.gz
|
name: focalboard-linux.tar.gz
|
||||||
path: ${{ github.workspace }}/linux/dist/focalboard-linux.tar.gz
|
path: ${{ github.workspace }}/focalboard/linux/dist/focalboard-linux.tar.gz
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
@ -74,21 +94,37 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
- name: Replace token 1 server
|
- name: Replace token 1 server
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 1 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: Replace token 2 server
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 2 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: npm ci
|
||||||
run: cd webapp; npm ci --no-optional
|
run: cd focalboard/webapp; npm ci --no-optional
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
@ -99,7 +135,7 @@ jobs:
|
|||||||
run: ls -n /Applications/ | grep Xcode*
|
run: ls -n /Applications/ | grep Xcode*
|
||||||
|
|
||||||
- name: Build macOS
|
- name: Build macOS
|
||||||
run: make mac-app
|
run: cd focalboard; make mac-app
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
|
||||||
BUILD_NUMBER: ${{ github.run_id }}
|
BUILD_NUMBER: ${{ github.run_id }}
|
||||||
@ -108,7 +144,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: focalboard-mac.zip
|
name: focalboard-mac.zip
|
||||||
path: ${{ github.workspace }}/mac/dist/focalboard-mac.zip
|
path: ${{ github.workspace }}/focalboard/mac/dist/focalboard-mac.zip
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
@ -116,24 +152,40 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
- name: Replace token 1 server
|
- name: Replace token 1 server
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 1 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: Replace token 2 server
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 2 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: Add msbuild to PATH
|
||||||
uses: microsoft/setup-msbuild@v1.1
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
- name: npm ci
|
- name: npm ci
|
||||||
run: cd webapp; npm ci --no-optional
|
run: cd focalboard/webapp; npm ci --no-optional
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
@ -146,10 +198,10 @@ jobs:
|
|||||||
nuget-version: '5.x'
|
nuget-version: '5.x'
|
||||||
|
|
||||||
- name: NuGet Restore
|
- name: NuGet Restore
|
||||||
run: nuget restore win-wpf\Focalboard.sln
|
run: nuget restore focalboard\win-wpf\Focalboard.sln
|
||||||
|
|
||||||
- name: Build Windows WPF app
|
- name: Build Windows WPF app
|
||||||
run: make win-wpf-app
|
run: cd focalboard; make win-wpf-app
|
||||||
env:
|
env:
|
||||||
BUILD_NUMBER: ${{ github.run_id }}
|
BUILD_NUMBER: ${{ github.run_id }}
|
||||||
|
|
||||||
@ -157,35 +209,51 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: focalboard.msix
|
name: focalboard.msix
|
||||||
path: ${{ github.workspace }}/win-wpf/focalboard.msix
|
path: ${{ github.workspace }}/focalboard/win-wpf/focalboard.msix
|
||||||
|
|
||||||
- name: Upload app zip package
|
- name: Upload app zip package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: focalboard-win.zip
|
name: focalboard-win.zip
|
||||||
path: ${{ github.workspace }}/win-wpf/dist/focalboard-win.zip
|
path: ${{ github.workspace }}/focalboard/win-wpf/dist/focalboard-win.zip
|
||||||
|
|
||||||
plugin:
|
plugin:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: "focalboard"
|
||||||
|
- id: "mattermostServer"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: steps.mattermostServer.outcome == 'failure'
|
||||||
|
with:
|
||||||
|
repository: "mattermost/mattermost-server"
|
||||||
|
fetch-depth: "20"
|
||||||
|
path: "mattermost-server"
|
||||||
|
ref : "master"
|
||||||
|
|
||||||
- name: Replace token 1 server
|
- name: Replace token 1 server
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 1 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: Replace token 2 server
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/server/services/telemetry/telemetry.go
|
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
|
- name: Replace token 2 webapp
|
||||||
run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/mattermost-plugin/webapp/src/index.tsx
|
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
|
- name: npm ci
|
||||||
run: cd webapp; npm ci --no-optional
|
run: cd focalboard/webapp; npm ci --no-optional
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
@ -198,21 +266,21 @@ jobs:
|
|||||||
node-version: 16.1.0
|
node-version: 16.1.0
|
||||||
|
|
||||||
- name: Build webapp
|
- name: Build webapp
|
||||||
run: make webapp
|
run: cd focalboard; make webapp
|
||||||
|
|
||||||
- name: npm ci plugin dependencies
|
- name: npm ci plugin dependencies
|
||||||
run: cd mattermost-plugin/webapp; npm ci --no-optional
|
run: cd focalboard/mattermost-plugin/webapp; npm ci --no-optional
|
||||||
|
|
||||||
- name: Build plugin
|
- name: Build plugin
|
||||||
run: cd mattermost-plugin; make dist
|
run: cd focalboard/mattermost-plugin; make dist
|
||||||
env:
|
env:
|
||||||
BUILD_NUMBER: ${{ github.run_id }}
|
BUILD_NUMBER: ${{ github.run_id }}
|
||||||
|
|
||||||
- name: Rename plugin file
|
- name: Rename plugin file
|
||||||
run: cd mattermost-plugin/dist; mv focalboard-*.tar.gz mattermost-plugin-focalboard.tar.gz
|
run: cd focalboard/mattermost-plugin/dist; mv focalboard-*.tar.gz mattermost-plugin-focalboard.tar.gz
|
||||||
|
|
||||||
- name: Upload plugin artifact
|
- name: Upload plugin artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: mattermost-plugin-focalboard.tar.gz
|
name: mattermost-plugin-focalboard.tar.gz
|
||||||
path: ${{ github.workspace }}/mattermost-plugin/dist/mattermost-plugin-focalboard.tar.gz
|
path: ${{ github.workspace }}/focalboard/mattermost-plugin/dist/mattermost-plugin-focalboard.tar.gz
|
||||||
|
2
.github/workflows/lint-server.yml
vendored
2
.github/workflows/lint-server.yml
vendored
@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||||
USE_LOCAL_MATTERMOST-SERVER_REPO: true
|
EXCLUDE_ENTERPRISE: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
golangci:
|
golangci:
|
||||||
|
4
.github/workflows/prod-release.yml
vendored
4
.github/workflows/prod-release.yml
vendored
@ -2,6 +2,10 @@ name: Production-Release
|
|||||||
|
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
env:
|
||||||
|
EXCLUDE_SERVER: true
|
||||||
|
EXCLUDE_ENTERPRISE: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
ubuntu:
|
ubuntu:
|
||||||
|
@ -39,30 +39,30 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprintln(os.Stdout, "go.work written successfully.")
|
fmt.Fprintln(os.Stdout, "go.work written successfully.")
|
||||||
|
fmt.Fprintln(os.Stdout, content)
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeGoWork(ci bool) string {
|
func makeGoWork(ci bool) string {
|
||||||
repos := []string{
|
repos := map[string]string{
|
||||||
"mattermost-server",
|
"../mattermost-server": "EXCLUDE_SERVER",
|
||||||
"enterprise",
|
"../enterprise": "EXCLUDE_ENTERPRISE",
|
||||||
|
"./mattermost-plugin": "EXCLUDE_PLUGIN",
|
||||||
}
|
}
|
||||||
|
|
||||||
var b strings.Builder
|
var b strings.Builder
|
||||||
|
|
||||||
b.WriteString("go 1.18\n\n")
|
b.WriteString("go 1.18\n\n")
|
||||||
b.WriteString("use ./mattermost-plugin\n")
|
|
||||||
b.WriteString("use ./server\n")
|
b.WriteString("use ./server\n")
|
||||||
|
|
||||||
for repoIdx := range repos {
|
for repo, envVarName := range repos {
|
||||||
if isEnvVarTrue(fmt.Sprintf("USE_LOCAL_%s_REPO", strings.ToUpper(repos[repoIdx])), true) {
|
if !isEnvVarTrue(envVarName, true) {
|
||||||
b.WriteString(fmt.Sprintf("use ../%s\n", repos[repoIdx]))
|
b.WriteString(fmt.Sprintf("use %s\n", repo))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ci {
|
if ci {
|
||||||
b.WriteString("use ./linux\n")
|
b.WriteString("use ./linux\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
return b.String()
|
return b.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ FROM golang:1.18.3@sha256:b203dc573d81da7b3176264bfa447bd7c10c9347689be405403818
|
|||||||
WORKDIR /go/src/focalboard
|
WORKDIR /go/src/focalboard
|
||||||
ADD . /go/src/focalboard
|
ADD . /go/src/focalboard
|
||||||
|
|
||||||
RUN make server-linux
|
|
||||||
|
RUN EXCLUDE_PLUGIN=true EXCLUDE_SERVER=true EXCLUDE_ENTERPRISE=true make server-linux
|
||||||
RUN mkdir /data
|
RUN mkdir /data
|
||||||
|
|
||||||
## Final image
|
## Final image
|
||||||
|
Loading…
Reference in New Issue
Block a user