EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 52e510a9 authored by Lubomir Dolezal's avatar Lubomir Dolezal
Browse files

revert removing pull & cache-from :latest to speedup

parent 6c590ab8
Branches
Tags
1 merge request!30Releases rework
...@@ -15,22 +15,28 @@ build-master: ...@@ -15,22 +15,28 @@ build-master:
script: script:
- VERSION_1=`grep 'version="*"' core/Dockerfile | cut -d '"' -f2` - VERSION_1=`grep 'version="*"' core/Dockerfile | cut -d '"' -f2`
- IMAGE_1="$CI_REGISTRY_IMAGE/pvs_core" - IMAGE_1="$CI_REGISTRY_IMAGE/pvs_core"
- docker build -t "$IMAGE_1":dev -t "$IMAGE_1":$VERSION_1 core/ - docker pull "$IMAGE_1":latest || true
- docker build --cache-from "$IMAGE_1":latest -t "$IMAGE_1":dev -t "$IMAGE_1":$VERSION_1 core/
- VERSION_2=`grep 'version="*"' preprocessor/Dockerfile | cut -d '"' -f2` - VERSION_2=`grep 'version="*"' preprocessor/Dockerfile | cut -d '"' -f2`
- IMAGE_2="$CI_REGISTRY_IMAGE/pvs_preprocessor" - IMAGE_2="$CI_REGISTRY_IMAGE/pvs_preprocessor"
- docker build -t "$IMAGE_2":dev -t "$IMAGE_2":$VERSION_2 preprocessor/ - docker pull "$IMAGE_2":latest || true
- docker build --cache-from "$IMAGE_2":latest -t "$IMAGE_2":dev -t "$IMAGE_2":$VERSION_2 preprocessor/
- VERSION_3=`grep 'version="*"' client/Dockerfile | cut -d '"' -f2` - VERSION_3=`grep 'version="*"' client/Dockerfile | cut -d '"' -f2`
- IMAGE_3="$CI_REGISTRY_IMAGE/pvs_client" - IMAGE_3="$CI_REGISTRY_IMAGE/pvs_client"
- docker build -t "$IMAGE_3":dev -t "$IMAGE_3":$VERSION_3 client/ - docker pull "$IMAGE_3":latest || true
- docker build --cache-from "$IMAGE_3":latest -t "$IMAGE_3":dev -t "$IMAGE_3":$VERSION_3 client/
- VERSION_4=`grep 'version="*"' cache/Dockerfile | cut -d '"' -f2` - VERSION_4=`grep 'version="*"' cache/Dockerfile | cut -d '"' -f2`
- IMAGE_4="$CI_REGISTRY_IMAGE/pvs_cache" - IMAGE_4="$CI_REGISTRY_IMAGE/pvs_cache"
- docker build -t "$IMAGE_4":dev -t "$IMAGE_4":$VERSION_4 cache/ - docker pull "$IMAGE_4":latest || true
- docker build --cache-from "$IMAGE_4":latest -t "$IMAGE_4":dev -t "$IMAGE_4":$VERSION_4 cache/
- VERSION_5=`grep 'version="*"' fluentd/Dockerfile | cut -d '"' -f2` - VERSION_5=`grep 'version="*"' fluentd/Dockerfile | cut -d '"' -f2`
- IMAGE_5="$CI_REGISTRY_IMAGE/fluentd" - IMAGE_5="$CI_REGISTRY_IMAGE/fluentd"
- docker build -t "$IMAGE_5":dev -t "$IMAGE_5":$VERSION_5 fluentd/ - docker pull "$IMAGE_5":latest || true
- docker build --cache-from "$IMAGE_5":latest -t "$IMAGE_5":dev -t "$IMAGE_5":$VERSION_5 fluentd/
- VERSION_6=`grep 'version="*"' ingestor/Dockerfile | cut -d '"' -f2` - VERSION_6=`grep 'version="*"' ingestor/Dockerfile | cut -d '"' -f2`
- IMAGE_6="$CI_REGISTRY_IMAGE/pvs_ingestor" - IMAGE_6="$CI_REGISTRY_IMAGE/pvs_ingestor"
- docker build -t "$IMAGE_6":dev -t "$IMAGE_6":$VERSION_6 ingestor/ - docker pull "$IMAGE_6":latest || true
- docker build --cache-from "$IMAGE_6":latest -t "$IMAGE_6":dev -t "$IMAGE_6":$VERSION_6 ingestor/
- cd ./testing && ./gitlab_test.sh - cd ./testing && ./gitlab_test.sh
- if [ $? -ne 0 ]; then exit 1; fi # actually fail build - if [ $? -ne 0 ]; then exit 1; fi # actually fail build
- docker push "$IMAGE_1":$VERSION_1 - docker push "$IMAGE_1":$VERSION_1
...@@ -57,17 +63,24 @@ build: ...@@ -57,17 +63,24 @@ build:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script: script:
- IMAGE="$CI_REGISTRY_IMAGE/pvs_core" - IMAGE="$CI_REGISTRY_IMAGE/pvs_core"
- docker build -t "$IMAGE":dev core/ - docker pull "$IMAGE":latest || true
- docker build --cache-from "$IMAGE":latest -t "$IMAGE":dev core/
- IMAGE="$CI_REGISTRY_IMAGE/pvs_preprocessor" - IMAGE="$CI_REGISTRY_IMAGE/pvs_preprocessor"
- docker build -t "$IMAGE":dev preprocessor/ - docker pull "$IMAGE":latest || true
- docker build --cache-from "$IMAGE":latest -t "$IMAGE":dev preprocessor/
- IMAGE="$CI_REGISTRY_IMAGE/pvs_client" - IMAGE="$CI_REGISTRY_IMAGE/pvs_client"
- docker build -t "$IMAGE":dev client/ - docker pull "$IMAGE":latest || true
- docker build --cache-from "$IMAGE":latest -t "$IMAGE":dev client/
- IMAGE="$CI_REGISTRY_IMAGE/pvs_cache" - IMAGE="$CI_REGISTRY_IMAGE/pvs_cache"
- docker build -t "$IMAGE":dev cache/ - docker pull "$IMAGE":latest || true
- docker build --cache-from "$IMAGE":latest -t "$IMAGE":dev cache/
- IMAGE="$CI_REGISTRY_IMAGE/fluentd" - IMAGE="$CI_REGISTRY_IMAGE/fluentd"
- docker build -t "$IMAGE":dev fluentd/ - docker pull "$IMAGE":latest || true
- docker build --cache-from "$IMAGE":latest -t "$IMAGE":dev fluentd/
- IMAGE="$CI_REGISTRY_IMAGE/pvs_ingestor" - IMAGE="$CI_REGISTRY_IMAGE/pvs_ingestor"
- docker build -t "$IMAGE":dev ingestor/ - docker pull "$IMAGE":latest || true
- cd ./testing && ./gitlab_test.sh && cd - - docker build --cache-from "$IMAGE":latest -t "$IMAGE":dev ingestor/
- cd ./testing && ./gitlab_test.sh
- if [ $? -ne 0 ]; then exit 1; fi # actually fail build
except: except:
- master - master
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment