1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-11 18:13:52 +02:00

Add GitLab ci to build internally and bump go to 1.16 (#468)

* update go to 1.16

* add gitlab ci to build focalboard
This commit is contained in:
Carlos Tadeu Panato Junior 2021-05-26 12:34:42 +02:00 committed by GitHub
parent b327bc7b8a
commit 36acff4476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 71 additions and 14 deletions

View File

@ -24,7 +24,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.15 go-version: 1.16
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2

View File

@ -23,7 +23,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.15 go-version: 1.16
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2

View File

@ -29,7 +29,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.15 go-version: 1.16
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2

View File

@ -24,7 +24,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.15 go-version: 1.16
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2

View File

@ -23,7 +23,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.15 go-version: 1.16
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2

11
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,11 @@
stages:
- build
- s3
variables:
BUILD: "yes"
include:
- project: mattermost/ci/focalboard
ref: main
file: private.yml

33
Dockerfile.build Normal file
View File

@ -0,0 +1,33 @@
# This dockerfile is used to build Focalboard for Linux
# it builds all the parts inside the container and the last stage just holds the
# package that can be extracted using docker cp command
# ie
# docker build -f Dockerfile.build --no-cache -t focalboard-build:dirty .
# docker run --rm -v /tmp/dist:/tmp -d --name test focalboard-build:dirty /bin/sh -c 'sleep 1000'
# docker cp test:/dist/focalboard-server-linux-amd64.tar.gz .
# build frontend
FROM node:16.1.0 AS frontend
WORKDIR /webapp
COPY webapp .
RUN npm install --no-optional
RUN npm run pack
# build backend and package
FROM golang:1.16.4 AS backend
COPY . .
COPY --from=frontend /webapp/pack webapp/pack
# RUN apt-get update && apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev -y
RUN make server-linux
RUN make server-linux-package-docker
# just hold the packages to output later
FROM alpine:3.12 AS dist
WORKDIR /dist
COPY --from=backend /go/dist/focalboard-server-linux-amd64.tar.gz .

View File

@ -90,6 +90,19 @@ server-linux-package: server-linux webapp
cd package && tar -czvf ../dist/focalboard-server-linux-amd64.tar.gz ${PACKAGE_FOLDER} cd package && tar -czvf ../dist/focalboard-server-linux-amd64.tar.gz ${PACKAGE_FOLDER}
rm -rf package rm -rf package
server-linux-package-docker:
rm -rf package
mkdir -p package/${PACKAGE_FOLDER}/bin
cp bin/linux/focalboard-server package/${PACKAGE_FOLDER}/bin
cp -R webapp/pack package/${PACKAGE_FOLDER}/pack
cp server-config.json package/${PACKAGE_FOLDER}/config.json
cp build/MIT-COMPILED-LICENSE.md package/${PACKAGE_FOLDER}
cp NOTICE.txt package/${PACKAGE_FOLDER}
cp webapp/NOTICE.txt package/${PACKAGE_FOLDER}/webapp-NOTICE.txt
mkdir -p dist
cd package && tar -czvf ../dist/focalboard-server-linux-amd64.tar.gz ${PACKAGE_FOLDER}
rm -rf package
server-enterprise-linux-package: server-linux webapp server-enterprise-linux-package: server-linux webapp
rm -rf package rm -rf package
mkdir -p package/${PACKAGE_FOLDER}/bin mkdir -p package/${PACKAGE_FOLDER}/bin

View File

@ -1,6 +1,6 @@
module github.com/mattermost/focalboard/server module github.com/mattermost/focalboard/server
go 1.15 go 1.16
require ( require (
github.com/Masterminds/squirrel v1.5.0 github.com/Masterminds/squirrel v1.5.0

View File

@ -1,6 +1,6 @@
module github.com/mattermost/focalboard/server module github.com/mattermost/focalboard/server
go 1.15 go 1.16
require ( require (
github.com/golang/mock v1.5.0 github.com/golang/mock v1.5.0