Initial Commit
This commit is contained in:
35
frontend/.gitlab-ci.yml
Normal file
35
frontend/.gitlab-ci.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
stages:
|
||||
- frontend_build
|
||||
- dockerize
|
||||
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- node_modules/
|
||||
- .next/cache/
|
||||
|
||||
variables:
|
||||
NEXT_PUBLIC_ENV: "production"
|
||||
OUTPUT_DIR: ".next"
|
||||
PROJECT_NAME: $CI_PROJECT_NAME
|
||||
DOCKER_IMAGE: $CI_REGISTRY_IMAGE
|
||||
|
||||
frontend_build_job:
|
||||
stage: frontend_build
|
||||
image: node:22@sha256:f6b9c31ace05502dd98ef777aaa20464362435dcc5e312b0e213121dcf7d8b95
|
||||
script:
|
||||
- cd frontend
|
||||
- npm install
|
||||
- npx next build
|
||||
- npm run lint
|
||||
|
||||
dockerize_frontend:
|
||||
stage: dockerize
|
||||
extends: .docker_build_template
|
||||
variables:
|
||||
DOCKER_CONTEXT: frontend
|
||||
DOCKERFILE: Dockerfile
|
||||
DOCKER_IMAGE: $DOCKER_IMAGE
|
||||
DOCKER_BUILD_ARGS: ""
|
||||
needs:
|
||||
- job: frontend_build_job
|
||||
Reference in New Issue
Block a user