Remake the CI machine
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
parent
11d92f33c8
commit
09f892ebd7
2 changed files with 42 additions and 0 deletions
39
.gitlab-ci.yml
Normal file
39
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# GitLab CI for FunQuail
|
||||
# EXPERIMENTAL
|
||||
image: alpine:3.23
|
||||
|
||||
variables:
|
||||
YARN_CACHE_FOLDER: "$CI_PROJECT_DIR/.cache/yarn"
|
||||
|
||||
before_script:
|
||||
- apk add --no-cache nodejs gzip tar yarn
|
||||
|
||||
# Build the backend
|
||||
backend:
|
||||
stage: build
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH =~ /(stable|master)/
|
||||
- changes: [api/**/*]
|
||||
script:
|
||||
- tar czvf funquail-be-${CI_COMMIT_REF_NAME}.tar.gz --owner prometheus --group prometheus --exclude-vcs api/
|
||||
artifacts:
|
||||
name: funquail-be-${CI_COMMIT_REF_NAME}.tar.gz
|
||||
|
||||
# Build the frontend
|
||||
frontend:
|
||||
stage: build
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH =~ /(stable|master)/
|
||||
- changes: [front/**/*]
|
||||
variables:
|
||||
NODE_OPTIONS: --max-old-space-size=4096
|
||||
before_script:
|
||||
- cd front
|
||||
- yarn install --frozen-lockfile
|
||||
script:
|
||||
- yarn run build:deployment
|
||||
after_script:
|
||||
- cd $OLDPWD
|
||||
- tar czvf funquail-fe-${CI_COMMIT_REF_NAME}.tar.gz --owner prometheus --group prometheus --exclude-vcs front/dist
|
||||
artifacts:
|
||||
name: funquail-fe-${CI_COMMIT_REF_NAME}.tar.gz
|
||||
|
|
@ -5,6 +5,9 @@ version: '3'
|
|||
vars:
|
||||
BUILD_DIR: build
|
||||
TASK_LIST: task -l
|
||||
VERSION:
|
||||
sh:
|
||||
- git describe --tags
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue