stages: - build - deploy build_docker_image: stage: build image: docker:19.03.12 # variables: # DOCKER_DRIVER: overlay2 # DOCKER_HOST: tcp://localhost:2375 services: - name: docker:19.03.12-dind alias: docker # command: ["--insecure-registry=registry.example.com"] script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG -f Dockerfile.tmfapi . - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG deploy: stage: deploy image: maven:3.9.5-ibm-semeru-17-focal script: - mvn deploy -s ci_settings.xml -DskipTests