fileserver/.gitlab-ci.yml

60 lines
1.4 KiB
YAML
Raw Normal View History

2022-08-28 16:29:11 +00:00
stages:
- build
- package
build_backend:
stage: build
2022-09-04 09:29:49 +00:00
image: reg.gitlab.mattv.de/root/docker-images/ubuntu_build_base:latest
2022-08-28 16:50:22 +00:00
cache:
2022-08-31 12:55:44 +00:00
key: backend
2022-08-28 16:50:22 +00:00
paths:
2022-08-31 12:41:55 +00:00
- vcpkg_cache
2022-08-28 16:29:11 +00:00
script:
- SRC="$PWD"
- TMP=$(mktemp -d)
- cd $TMP
- git clone https://github.com/Microsoft/vcpkg.git .
- ./bootstrap-vcpkg.sh -disableMetrics
- cd $SRC
2022-08-31 12:55:44 +00:00
- mkdir -p vcpkg_cache
2022-08-31 12:41:55 +00:00
- VCPKG_DEFAULT_BINARY_CACHE=$SRC/vcpkg_cache cmake -B build -S backend -DCMAKE_TOOLCHAIN_FILE=$TMP/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
2022-08-28 16:29:11 +00:00
- cmake --build build
- cp build/backend server
artifacts:
paths:
2022-08-28 16:50:22 +00:00
- server
2022-08-28 16:29:11 +00:00
test_and_build_frontend:
image: node:latest
stage: build
cache:
2022-08-31 12:55:44 +00:00
key: frontend
2022-08-28 16:29:11 +00:00
paths:
- frontend/.yarn
- frontend/node_modules
script:
- cd frontend
- yarn install --cache-folder .yarn --frozen-lockfile
- yarn lint
- yarn build
artifacts:
paths:
- frontend/dist/
package_server:
2022-09-04 09:29:49 +00:00
image: alpine:latest
2022-08-28 16:29:11 +00:00
stage: package
before_script: []
needs:
- job: build_backend
artifacts: true
- job: test_and_build_frontend
artifacts: true
script:
- mkdir static
- mv frontend/dist/* static/
artifacts:
paths:
- server
- static/