.gitlab-ci.yml 773 Bytes
Newer Older
1 2 3 4
image : docker
variables:
  DOCKER_DRIVER: overlay2

5

6 7 8 9
stages :
  - build

.docker_build_template: &docker_build
10 11
  tags:
    - dind
12
  stage : build
Guillaume Mella's avatar
Guillaume Mella committed
13 14
  only:
    changes:
15 16
      - Dockerfile
      - .env
17 18 19 20
  services:
    - docker:dind
  before_script:
    - source .env
21
    - export IMAGE_TAG
22 23 24
    - cd jmdc-$IMAGE
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
25 26 27 28
      #    - docker build -t $CI_REGISTRY_IMAGE/$IMAGE:$IMAGE_TAG .
      #    - docker push $CI_REGISTRY_IMAGE/$IMAGE:$IMAGE_TAG
    - docker build -t $CI_REGISTRY_IMAGE/$IMAGE:$CI_COMMIT_TAG .
    - docker push $CI_REGISTRY_IMAGE/$IMAGE:$CI_COMMIT_TAG
29 30 31 32 33

build ui:
  <<: *docker_build
  variables:
    IMAGE: ui
34

35 36 37 38
#build postgres:
#  <<: *docker_build
#  variables:
#    IMAGE: postgres