2019-04-27 17:16:50 +00:00
|
|
|
environment:
|
|
|
|
stage: environment
|
2019-05-27 12:08:47 +00:00
|
|
|
image: docker:18.09.6
|
2019-04-27 17:16:50 +00:00
|
|
|
variables:
|
2019-04-28 10:15:24 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: none # no need to fetch submodules
|
2019-08-02 11:00:54 +00:00
|
|
|
CONTAINER_NAME: "$CI_REGISTRY/satoshilabs/trezor/trezor-firmware/environment"
|
2019-04-27 17:16:50 +00:00
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
before_script:
|
|
|
|
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
2019-05-27 07:52:46 +00:00
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- ci/*
|
2019-04-27 17:16:50 +00:00
|
|
|
script:
|
|
|
|
- docker pull $CONTAINER_NAME:latest || true
|
|
|
|
- docker build --cache-from $CONTAINER_NAME:latest --tag $CONTAINER_NAME:$CI_COMMIT_SHA --tag $CONTAINER_NAME:latest ci/
|
|
|
|
- docker push $CONTAINER_NAME:$CI_COMMIT_SHA
|
|
|
|
- docker push $CONTAINER_NAME:latest
|