variables:
  DOCKER_REGISTRY: 'harbor.51gjj.com'

stages:
  - pre_deploy

build_docker_image:
  stage: pre_deploy
  script:
    - export IMAGE_TAG=${CI_COMMIT_TAG:-latest}
    - docker build -t $DOCKER_REGISTRY/registry/$CI_PROJECT_NAME:$IMAGE_TAG .
    - docker push $DOCKER_REGISTRY/registry/$CI_PROJECT_NAME:$IMAGE_TAG
  tags:
    - docker-image-builder

