.gitlab-ci.yml 449 Bytes
Newer Older
Lassi Niemistö's avatar
Lassi Niemistö committed
1 2 3 4 5 6 7
image: docker:latest
services:
  - docker:dind

before_script:
  - docker info

8 9
build-master:
  stage: build
Lassi Niemistö's avatar
Lassi Niemistö committed
10
  script:
11
    - docker build . --tag "$CI_REGISTRY_IMAGE"
12
    - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin
13 14 15 16 17 18 19
    - docker push "$CI_REGISTRY_IMAGE"
  only:
    - master

build-branches:
  stage: build
  script:
20
    - docker build . --tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
21 22
  except:
    - master