Gitlab CI/CD Pipeline

This commit is contained in:
2025-05-29 18:51:59 +00:00
parent cb4eb80105
commit 5a73be331b
30 changed files with 432 additions and 144 deletions

View File

@@ -1,35 +1,23 @@
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
build_frontend:
stage: build
image: node:22@sha256:f6b9c31ace05502dd98ef777aaa20464362435dcc5e312b0e213121dcf7d8b95
script:
- cd frontend
- npm install
- npx next build
- npm run lint
- |
cd frontend
npm install
npx next build
dockerize_frontend:
stage: dockerize
extends: .docker_build_template
docker_frontend:
extends: .docker-build-template
variables:
DOCKER_CONTEXT: frontend
DOCKERFILE: Dockerfile
DOCKER_IMAGE: $DOCKER_IMAGE
DOCKER_BUILD_ARGS: ""
IMAGE_NAME: frontend
WORKDIR_PATH: frontend
DOCKERFILE_PATH: Dockerfile
needs:
- job: frontend_build_job
- build_frontend