Fix deploy stage.
@@ -13,11 +13,11 @@ variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
-before_script:
- - docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
build:
stage: build
+ before_script:
+ - docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
@@ -29,7 +29,7 @@ test:
- docker info
- apk add --update py-pip make npm build-base python2-dev libffi-dev openssl-dev
- pip install docker-compose
- image: docker:latest
+ - docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
script:
- cp .env-dist .env
- make test
