Files
sk_fems_apigw/.gitlab-ci.yml
2025-07-12 15:03:31 +09:00

43 lines
1.4 KiB
YAML

services:
- docker:19.03.7-dind
stages:
- build_jar
- build_docker_image
build:
image: maven:3.6.3-jdk-11-slim
stage: build_jar
script:
# maven build
- echo "=====maven build start====="
- mvn clean install
- echo "=====maven build end====="
tags:
- test
docker-build:
variables:
# do not clone again
GIT_STRATEGY: none
stage: build_docker_image
script:
# make docker image and push to local docker
- echo "=====make docker image and push to local docker start====="
- sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- sudo docker build -t $CI_REGISTRY/root/registry/skfems/apigw .
- echo "=====make docker image and push to local docker end====="
# push local image to local registry
- echo "=====push local image to local registry start====="
- sudo docker push $CI_REGISTRY/root/registry/skfems/apigw
- sudo docker rmi $CI_REGISTRY/root/registry/skfems/apigw
- echo "=====push local image to local registry end====="
# comm.base 모듈 분리 배포
- echo "=====node build_docker_image comm.base module start====="
- sudo docker build -f Dockerfile.keti -t $CI_REGISTRY/root/registry/skfems/apigw_keti .
- sudo docker push $CI_REGISTRY/root/registry/skfems/apigw_keti
- sudo docker rmi $CI_REGISTRY/root/registry/skfems/apigw_keti
- echo "=====node build_docker_image comm module end====="
tags:
- test