.gitlab-ci.yml 1000 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
docker-build-master:
  # Official docker image.
  image: docker:git
  stage: build
  services:
    - docker:dind
  before_script:
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
    - /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.3.6/earth-linux-amd64 -O /usr/local/bin/earth && chmod +x /usr/local/bin/earth'
  script:
    - earth +prod
    - earth -P +integration-test
    - docker push "$CI_REGISTRY_IMAGE"
  only:
    - master

docker-build:
  # Official docker image.
  image: docker:git
  stage: build
  services:
    - docker:dind
  before_script:
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
    - /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.3.6/earth-linux-amd64 -O /usr/local/bin/earth && chmod +x /usr/local/bin/earth'
  script:
    - earth +prod
    - earth -P +integration-test
    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
  except:
    - master