.gitlab-ci.yml 798 Bytes
Newer Older
1 2 3 4 5 6 7 8
image: docker:latest

services:
  - docker:dind

before_script:
  - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY

9
lint_dockerfile:
Erick Hitter's avatar
Erick Hitter committed
10
  stage: test
11 12 13
  image: hadolint/hadolint:latest-debian
  script:
    - find . -name "Dockerfile" -execdir hadolint {} \;
14 15 16 17 18

build-golang-master:
  stage: build
  script:
    - docker build --pull -t "$CI_REGISTRY/docker/images/golang:latest" ./golang/latest
Erick Hitter's avatar
Erick Hitter committed
19
#    - docker push "$CI_REGISTRY/docker/images/golang:latest"
20 21 22 23 24 25
  only:
    - master

build-golang-dev:
  stage: build
  script:
Erick Hitter's avatar
Erick Hitter committed
26 27
    - echo $CI_REGISTRY_IMAGE
    - echo $CI_REGISTRY
28 29 30 31
    - docker build --pull -t "$CI_REGISTRY/docker/images/golang:$CI_COMMIT_REF_SLUG" ./golang/latest
#    - docker push "$CI_REGISTRY/docker/images/golang:$CI_COMMIT_REF_SLUG"
  except:
    - master